[HttpKernel] Updated TraceableEventDispatcher.php

This commit is contained in:
janschoenherr 2013-03-13 17:29:07 +01:00 committed by Fabien Potencier
parent d32c1c0d9c
commit d9ee8695dc

View File

@ -132,6 +132,10 @@ class TraceableEventDispatcher implements EventDispatcherInterface, TraceableEve
$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