From 28023828aec24a8a8dc08787b6223e8fef2f4909 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Sat, 18 Nov 2006 15:54:28 +0000 Subject: [PATCH] Hide notices if the site is not in debug mode git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1102 839d8a87-29fc-0310-9880-83ba4fa771e5 --- include/platal.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/platal.inc.php b/include/platal.inc.php index b936f32..1d8d6b7 100644 --- a/include/platal.inc.php +++ b/include/platal.inc.php @@ -69,6 +69,13 @@ function pl_error_handler($errno, $errstr, $errfile, $errline) E_STRICT => "Runtime Notice" ); + global $globals; + if (!$globals->debug) { + if (strpos($errortype[$errno], 'Notice') !== false) { + return; + } + } + $errstr = htmlentities($errstr); $GLOBALS['pl_errors'][] = "
". -- 2.1.4