Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.7.2, 3.7.5
-
Component/s: Administration, Messages
-
Labels:
Description
We are seeing loads of debug messages sent to the Moodle server admin by the Moodle cronjob saying
PHP Notice: Undefined property: stdClass::$mnethostid in /var/www/html/moodle_prod/lib/pagelib.php on line 1614
|
PHP Notice: Undefined property: stdClass::$mnethostid in /var/www/html/moodle_prod/lib/pagelib.php on line 1617
|
Looking at these lines, these is are comparisons made of
$CFG->mnet_localhost_id and $USER->mnethostid
In our setup, $CFG->mnet_localhost_id is set to 1 in the mdl_config table.
All users in the mdl_user table have the column mnethostid also set to 1 without any exception.
I have the assumption that this particular piece of code is executed by some scheduled task which does not have a full $USER object set.
This issue was also reported recently by Acqua Alta on MDL-18231 (which is a closed, old ticket) and he mentioned there:
Every time a teacher sends a bulk message to the students using the "Announcements" forum, the server sends us an e-mail message with the following error message [...]
Based on this report, I am adding the messages component to this issue.