From d70b66390400f3538713fa307c69b3000ed1fc1a Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 28 Oct 2007 13:29:15 +0100 Subject: [PATCH] Fix an error in error_handler making debug a bit harder Signed-off-by: Florent Bruneau --- include/platal.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/platal.inc.php b/include/platal.inc.php index ad6bbe9..83833e5 100644 --- a/include/platal.inc.php +++ b/include/platal.inc.php @@ -74,7 +74,8 @@ function pl_error_handler($errno, $errstr, $errfile, $errline) E_USER_ERROR => "User Error", E_USER_WARNING => "User Warning", E_USER_NOTICE => "User Notice", - E_STRICT => "Runtime Notice" + E_STRICT => "Runtime Notice", + E_RECOVERABLE_ERROR => "Recoverable Error" ); } @@ -85,10 +86,11 @@ function pl_error_handler($errno, $errstr, $errfile, $errline) } } + $type = isset($errortype[$errno]) ? $errortype[$errno] : $errno; $errstr = utf8_encode(htmlentities($errstr)); $GLOBALS['pl_errors'][] = "
". - "{$errortype[$errno]} $errstr
". + "{$type} $errstr
". "$errfile : $errline". "
"; } -- 2.1.4