mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
cron: MDL-19774 temporary hack so cron does not crash.
This commit is contained in:
parent
652ee8aa56
commit
43b152f69a
@ -925,6 +925,9 @@ function cron_setup_user($user=null, $course=null) {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO MDL-19774 relying on global $PAGE in cron is a bad idea.
|
||||
// Temporary hack so that cron does not give fatal errors.
|
||||
$PAGE = new moodle_page();
|
||||
if ($course) {
|
||||
$PAGE->set_course($course);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user