Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.2.6
-
None
-
MOODLE_22_STABLE
-
MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
-
MDL-36640-master -
Description
Some add_to_log functions are adding text into the info field of the log table.
Whilst course/lib.php::print_log() handles these correctly, the corresponding functions for CSV, XLS, and ODS output do not.
They're all missing a check for is_numeric($log->info) which results in get_field() trying to fetch from a table (mdl_assign in my case) using a string for the ID field and throwing DB exceptions.