Permalink
Browse files

[HttpKernel] Updated TraceableEventDispatcher.php

  • Loading branch information...
1 parent 2a354f1 commit 95a7ed9ead6a8af9338df3fd8516adc46e27e941 @janschoenherr janschoenherr committed with fabpot Mar 13, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 Debug/TraceableEventDispatcher.php
@@ -132,6 +132,10 @@ public function dispatch($eventName, Event $event = null)
$this->firstCalledEvent[$eventName] = $this->stopwatch->start($eventName.'.loading', 'event_listener_loading');
+ if (!$this->dispatcher->hasListeners($eventName)) {
+ $this->firstCalledEvent[$eventName]->stop();
+ }
+
$this->dispatcher->dispatch($eventName, $event);
// reset the id as another event might have been dispatched during the dispatching of this event

0 comments on commit 95a7ed9

Please sign in to comment.