Browse Source

Prevent the same error from being displayed twice

stevetruckstuff 19 years ago
parent
commit
4df9981f2d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      class/error.class.php

+ 5 - 1
class/error.class.php

@@ -244,7 +244,11 @@ class ErrorHandler {
         }
 
         if (isset($this->Template->values['aErrors']) && count($this->Template->values['aErrors']) > 0) {
-            $this->aErrors = array_merge($this->aErrors, $this->Template->values['aErrors']);
+            foreach ($this->Template->values['aErrors'] as $err) {
+                if (!in_array($err, $this->aErrors, true)) {
+                    $this->aErrors[] = $err;
+                }
+            }
             $this->Template->assign('aErrors',$this->aErrors);
         }