Clear alerts stack after calling alerts()
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 5 Aug 2009 17:57:54 +0000 (11:57 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 5 Aug 2009 17:57:54 +0000 (11:57 -0600)
framework/Imap_Client/lib/Horde/Imap/Client/Socket.php

index bea0dc5..f3fca45 100644 (file)
@@ -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;
     }
 
     /**