From: x2003bruneau Date: Sat, 18 Nov 2006 15:54:28 +0000 (+0000) Subject: Hide notices if the site is not in debug mode X-Git-Tag: xorg/0.9.12~96 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=28023828aec24a8a8dc08787b6223e8fef2f4909;p=platal.git 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 --- 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'][] = "
".