-
Bug
-
Resolution: Fixed
-
Minor
-
3.11
-
MOODLE_311_STABLE
-
MOODLE_310_STABLE, MOODLE_311_STABLE
-
The log report contains code to try to account for logs containing users who weren't present the first time the logreader was used to select log records (MDL-48595)
It's hard to hit in practice, except on very high traffic sites with lots of consistent log data, but easy to replicate by patching locally to simulate the same
The // We already looked for the user and it does not exist. line doesn't account for users who we haven't previously looked for at all, and generates the following PHP notice:
Notice: Undefined offset: 6 in /opt/moodle/master/src/report/log/classes/table_log.php on line 122
|
The subsequent code for requesting the user object from the database doesn't make much sense either as $DB->get_records_sql returns an array, which means the fullname column of such rows contain just a dash instead of the expected users fullname: