Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.0.1
-
MOODLE_30_STABLE
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
MDL-52608-master -
Description
There is code in /lib/moodlelib.php:3263:
// Get all of the name fields.
|
$allnames = get_all_user_name_fields(); |
if ($CFG->debugdeveloper) { |
foreach ($allnames as $allname) { |
if (!array_key_exists($allname, $user)) { |
// If all the user name fields are not set in the user object, then notify the programmer that it needs to be fixed. |
debugging('You need to update your sql to include additional name fields in the user object.', DEBUG_DEVELOPER); |
// Message has been sent, no point in sending the message multiple times. |
break; |
}
|
}
|
}
|
Problem is in the line 3267:
if (!array_key_exists($allname, $user)) { |
$user is stdClass, line can be changed to:
if (!object_property_exists($user, $allname)) { |