From d3ef95a22849c1adbb5ad5b144a20b829d939b14 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 5 Aug 2009 11:57:54 -0600 Subject: [PATCH] Clear alerts stack after calling alerts() --- framework/Imap_Client/lib/Horde/Imap/Client/Socket.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php index bea0dc5d8..f3fca4592 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php @@ -241,7 +241,11 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base */ public function alerts() { - return empty($this->_temp['alerts']) ? array() : $this->_temp['alerts']; + $alerts = empty($this->_temp['alerts']) + ? array() + : $this->_temp['alerts']; + $this->_temp['alerts'] = array(); + return $alerts; } /** -- 2.11.0