From b48d124a17215d328e810b134a364e6a8ae8b36e Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 24 Apr 2007 18:53:12 +0000 Subject: [PATCH] lets prevent detection of strict PHP5 errors in redirect in developer debug mode --- lib/weblib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.5