From: stevetruckstuff Date: Thu, 31 Aug 2006 18:05:41 +0000 (+0000) Subject: Prevent the same error from being displayed twice X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1d6c232cc18c8a3f92ba32fc3b40cba457f863cd;p=squirrelmail.git Prevent the same error from being displayed twice git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11664 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/error.class.php b/class/error.class.php index df401de6..57ca84bf 100644 --- a/class/error.class.php +++ b/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); }