Merged changes up to 2.3.16 into unstable
[fa-stable.git] / includes / errors.inc
index 9b40fa9f887e4c08c2b25f758319463e59d0d12f..8b02f299148413e691d530427361fcc3a0567fef 100644 (file)
@@ -76,7 +76,9 @@ function error_handler($errno, $errstr, $file, $line) {
 
        // error_reporting==0 when messages are set off with @ 
        if ($errno & error_reporting()) {
-               $messages[] = array($errno, $errstr, $file, $line, @$bt);
+               // suppress duplicated errors
+               if (!in_array(array($errno, $errstr, $file, $line, @$bt), $messages))
+                       $messages[] = array($errno, $errstr, $file, $line, @$bt);
        }
        else if($errno&~E_NOTICE) { // log all not displayed messages 
                $user = @$_SESSION["wa_current_user"]->loginname;