[HttpKernel] Updated TraceableEventDispatcher.php
This commit is contained in:
parent
d32c1c0d9c
commit
d9ee8695dc
@ -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
|
||||
|
Reference in New Issue
Block a user