X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fplatal.inc.php;h=6bfd24f83d8244ae345989600f23e9bc93c974c7;hb=b3ec63d58dc3bb0e0e380774bf62b410542deb6d;hp=42e776a3c571b17035edda041d1ff3d327f9e625;hpb=abe7e055f16e6f6e9605c2965164169babbf9b7f;p=platal.git diff --git a/include/platal.inc.php b/include/platal.inc.php index 42e776a..6bfd24f 100644 --- a/include/platal.inc.php +++ b/include/platal.inc.php @@ -1,6 +1,6 @@ "Error", - E_WARNING => "Warning", - E_PARSE => "Parsing Error", - E_NOTICE => "Notice", - E_CORE_ERROR => "Core Error", - E_CORE_WARNING => "Core Warning", - E_COMPILE_ERROR => "Compile Error", - E_COMPILE_WARNING => "Compile Warning", - E_USER_ERROR => "User Error", - E_USER_WARNING => "User Warning", - E_USER_NOTICE => "User Notice", - E_STRICT => "Runtime Notice" - ); + if (!isset($errortype)) { + $errortype = array ( + E_ERROR => "Error", + E_WARNING => "Warning", + E_PARSE => "Parsing Error", + E_NOTICE => "Notice", + E_CORE_ERROR => "Core Error", + E_CORE_WARNING => "Core Warning", + E_COMPILE_ERROR => "Compile Error", + E_COMPILE_WARNING => "Compile Warning", + E_USER_ERROR => "User Error", + E_USER_WARNING => "User Warning", + E_USER_NOTICE => "User Notice", + E_STRICT => "Runtime Notice", + E_RECOVERABLE_ERROR => "Recoverable Error" + ); + } global $globals; if (isset($globals) && !$globals->debug) { - if (strpos($errortype[$errno], 'Notice') !== false) { + if ($errno == E_NOTICE || $errno == E_USER_NOTICE || $errno == E_STRICT) { return; } } + $type = isset($errortype[$errno]) ? $errortype[$errno] : $errno; $errstr = utf8_encode(htmlentities($errstr)); $GLOBALS['pl_errors'][] = "