Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'hotfix/2924' into develop

Forward port #2924
  • Loading branch information...
commit 6825afc0fa9df6c73fa316178401fb8289efee77 2 parents cff7755 + e106c09
@weierophinney weierophinney authored
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) {
Please sign in to comment.
Something went wrong with that request. Please try again.