Fix clearing the message stacks.
authorGunnar Wrobel <p@rdus.de>
Wed, 4 Nov 2009 23:16:45 +0000 (00:16 +0100)
committerGunnar Wrobel <p@rdus.de>
Wed, 4 Nov 2009 23:16:45 +0000 (00:16 +0100)
Looks like I should avoid implementing ArrayAcces for
the storage handler. That prevents passing around the
stacks by reference.

framework/Notification/lib/Horde/Notification/Handler/Base.php

index 8d67669..0753e89 100644 (file)
@@ -218,8 +218,9 @@ implements Horde_Notification_Handler_Interface
     {
         foreach ($options['listeners'] as $listener) {
             if (isset($this->_listeners[$listener])) {
-                $instance = $this->_storage[$this->_listeners[$listener]->getName()];
-                $this->_listeners[$listener]->notify($instance, $options);
+                $stack = $this->_storage[$this->_listeners[$listener]->getName()];
+                $this->_listeners[$listener]->notify($stack, $options);
+                $this->_storage[$this->_listeners[$listener]->getName()] = $stack;
             }
         }
     }