Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
MDL-24445 fixed problem with uninitialised PAGE object
[moodle.git]
/
lib
/
weblib.php
diff --git
a/lib/weblib.php
b/lib/weblib.php
index
63fb88e
..
0363501
100644
(file)
--- a/
lib/weblib.php
+++ b/
lib/weblib.php
@@
-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);