-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.7, 4.1.2
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
-
MDL-77723-401 -
- Covered by automated tests (PHPUnit)
As reported by tlock, as a regression from MDL-76873
If the $CFG->showuseridentity configuration refers to an invalid custom profile field (because it was deleted after being set as the user identity) the following exception is observed when viewing course participants:
Warning: Attempt to read property "datatype" on null in /opt/moodle/master/src/user/classes/fields.php on line 384
|
|
Warning: Attempt to read property "id" on null in /opt/moodle/master/src/user/classes/fields.php on line 384
|
|
Exception - profile_get_user_field(): Argument #1 ($type) must be of type string, null given, called in [dirroot]/user/classes/fields.php on line 384
|
|
More information about this error
|
Debug info:
|
Error code: generalexceptionmessage
|
Stack trace:
|
|
line 609 of /user/profile/lib.php: TypeError thrown
|
line 384 of /user/classes/fields.php: call to profile_get_user_field()
|
line 142 of /user/classes/table/participants.php: call to core_user\fields::get_identity_fields()
|
line 181 of /user/index.php: call to core_user\table\participants->out()
|
- is a regression caused by
-
MDL-76873 Exceptions due to inconsistent profile field visibility checking in reports
-
- Closed
-