Permalink
Browse files

Merge branch 'hotfix/2924'

Close #2924
  • Loading branch information...
2 parents 45457cc + e106c09 commit c0d2b6e1d4608b491fe0d17d9ffd328d7131fc3f @weierophinney weierophinney committed Nov 19, 2012
Showing with 6 additions and 14 deletions.
  1. +6 −14 library/Zend/EventManager/EventManager.php
View
20 library/Zend/EventManager/EventManager.php
@@ -447,19 +447,15 @@ protected function triggerListeners($event, EventInterface $e, $callback = null)
$wildcardListeners = $this->getListeners('*');
if (count($sharedListeners) || count($sharedWildcardListeners) || count($wildcardListeners)) {
$listeners = clone $listeners;
- }
-
- // Shared listeners on this specific event
- $this->insertListeners($listeners, $sharedListeners);
- // Shared wildcard listeners
- $this->insertListeners($listeners, $sharedWildcardListeners);
+ // Shared listeners on this specific event
+ $this->insertListeners($listeners, $sharedListeners);
- // Add wildcard listeners
- $this->insertListeners($listeners, $wildcardListeners);
+ // Shared wildcard listeners
+ $this->insertListeners($listeners, $sharedWildcardListeners);
- if ($listeners->isEmpty()) {
- return $responses;
+ // Add wildcard listeners
+ $this->insertListeners($listeners, $wildcardListeners);
}
foreach ($listeners as $listener) {
@@ -535,10 +531,6 @@ protected function getSharedListeners($event)
*/
protected function insertListeners($masterListeners, $listeners)
{
- if (!count($listeners)) {
- return;
- }
-
foreach ($listeners as $listener) {
$priority = $listener->getMetadatum('priority');
if (null === $priority) {

0 comments on commit c0d2b6e

Please sign in to comment.