]> git.mjollnir.org Git - moodle.git/commitdiff
lets prevent detection of strict PHP5 errors in redirect in developer debug mode
authorskodak <skodak>
Tue, 24 Apr 2007 18:53:12 +0000 (18:53 +0000)
committerskodak <skodak>
Tue, 24 Apr 2007 18:53:12 +0000 (18:53 +0000)
lib/weblib.php

index 8b6c2f848a135263a0267585272aeeb4d601072f..5c1285ff4d76c93a6285142dbb32c2ed9f584da8 100644 (file)
@@ -5066,9 +5066,9 @@ function redirect($url, $message='', $delay=-1, $adminroot = '') {
     $url = str_replace('&amp;', '&', $encodedurl);
 
 /// At developer debug level. Don't redirect if errors have been printed on screen.
-/// Currenly only works in PHP 5.2+
+/// Currenly only works in PHP 5.2+; we do not want strict PHP5 errors
     $error = error_get_last();
-    $errorprinted = debugging('', DEBUG_DEVELOPER) && $CFG->debugdisplay && !empty($error);
+    $errorprinted = debugging('', DEBUG_DEVELOPER) && $CFG->debugdisplay && !empty($error) && ($error['type'] & DEBUG_DEVELOPER);
     if ($errorprinted) {
         $message = "<strong>Error output, so disabling automatic redirect.</strong></p><p>" . $message;
     }