Browse Source

Removed extra if statement

Jeremy Harris 9 years ago
parent
commit
a0aba8a392
1 changed files with 5 additions and 6 deletions
  1. 5 6
      src/Event/EventManager.php

+ 5 - 6
src/Event/EventManager.php

@@ -359,10 +359,12 @@ class EventManager
         }
 
         $listeners = $this->listeners($event->name());
+
+        if ($this->_trackEvents) {
+            $this->addEventToList($event);
+        }
+
         if (empty($listeners)) {
-            if ($this->_trackEvents) {
-                $this->addEventToList($event);
-            }
             return $event;
         }
 
@@ -379,9 +381,6 @@ class EventManager
             }
         }
 
-        if ($this->_trackEvents) {
-            $this->addEventToList($event);
-        }
         return $event;
     }