Hide notices if the site is not in debug mode
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 18 Nov 2006 15:54:28 +0000 (15:54 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 18 Nov 2006 15:54:28 +0000 (15:54 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1102 839d8a87-29fc-0310-9880-83ba4fa771e5

include/platal.inc.php

index b936f32..1d8d6b7 100644 (file)
@@ -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'][] =
         "<div class='phperror'>".