]> git.mjollnir.org Git - moodle.git/commitdiff
cron: MDL-19774 temporary hack so cron does not crash.
authortjhunt <tjhunt>
Mon, 13 Jul 2009 06:08:48 +0000 (06:08 +0000)
committertjhunt <tjhunt>
Mon, 13 Jul 2009 06:08:48 +0000 (06:08 +0000)
lib/sessionlib.php

index 80d11d19bf78e27d4accde8c9282e5db781691d9..5123833f27e5fd207dd7e95012b0e55531fa2499 100644 (file)
@@ -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 {