mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-48729_legacy_log_error' of https://github.com/andyjdavis/moodle
This commit is contained in:
commit
c81689fa75
@ -91,15 +91,18 @@ class store implements \tool_log\log\store, \core\log\sql_select_reader {
|
||||
// Replace the query with hardcoded mappings required for core.
|
||||
list($selectwhere, $params, $sort) = self::replace_sql_legacy($selectwhere, $params, $sort);
|
||||
|
||||
$events = array();
|
||||
$records = array();
|
||||
|
||||
try {
|
||||
// A custom report + on the fly SQL rewriting = a possible exception.
|
||||
$records = $DB->get_recordset_select('log', $selectwhere, $params, $sort, '*', $limitfrom, $limitnum);
|
||||
} catch (\moodle_exception $ex) {
|
||||
debugging("error converting legacy event data " . $ex->getMessage() . $ex->debuginfo, DEBUG_DEVELOPER);
|
||||
return array();
|
||||
}
|
||||
|
||||
$events = array();
|
||||
|
||||
foreach ($records as $data) {
|
||||
$events[$data->id] = \logstore_legacy\event\legacy_logged::restore_legacy($data);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user