From: skodak Date: Tue, 24 Apr 2007 18:53:12 +0000 (+0000) Subject: lets prevent detection of strict PHP5 errors in redirect in developer debug mode X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b48d124a17215d328e810b134a364e6a8ae8b36e;p=moodle.git lets prevent detection of strict PHP5 errors in redirect in developer debug mode --- diff --git a/lib/weblib.php b/lib/weblib.php index 8b6c2f848a..5c1285ff4d 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -5066,9 +5066,9 @@ function redirect($url, $message='', $delay=-1, $adminroot = '') { $url = str_replace('&', '&', $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 = "Error output, so disabling automatic redirect.

" . $message; }