From 1d6c232cc18c8a3f92ba32fc3b40cba457f863cd Mon Sep 17 00:00:00 2001 From: stevetruckstuff Date: Thu, 31 Aug 2006 18:05:41 +0000 Subject: [PATCH] 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 --- class/error.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } -- 2.25.1