]> git.mjollnir.org Git - moodle.git/commitdiff
weblib MDL-19196 Added guard around call to error_get_last to prevent error if runnin...
authorAndrew Davis <andrew@affinitysoftware.net>
Wed, 18 Nov 2009 00:57:05 +0000 (00:57 +0000)
committerAndrew Davis <andrew@affinitysoftware.net>
Wed, 18 Nov 2009 00:57:05 +0000 (00:57 +0000)
lib/weblib.php

index 3046547a8ea9c24c56bbf8f6c3c677d0ab723757..48f2891839862de6e301fa70491cfadf7e05b2ad 100644 (file)
@@ -2738,7 +2738,9 @@ function redirect($url, $message='', $delay=-1) {
        $url = $SESSION->sid_process_url($url);
     }
 
-    $lasterror = error_get_last();
+    if (function_exists('error_get_last')) {
+        $lasterror = error_get_last();
+    }
     $debugdisableredirect = defined('DEBUGGING_PRINTED') ||
             (!empty($CFG->debugdisplay) && !empty($lasterror) && ($lasterror['type'] & DEBUG_DEVELOPER));