MDL-24445 fixed problem with uninitialised PAGE object
This commit is contained in:
+3
-1
@@ -2519,7 +2519,9 @@ function redirect($url, $message='', $delay=-1) {
|
||||
}
|
||||
|
||||
// prevent debug errors - make sure context is properly initialised
|
||||
$PAGE->set_context(null);
|
||||
if ($PAGE) {
|
||||
$PAGE->set_context(null);
|
||||
}
|
||||
|
||||
if ($url instanceof moodle_url) {
|
||||
$url = $url->out(false);
|
||||
|
||||
Reference in New Issue
Block a user