Skip to content

Commit 714764f

Browse files
committed
[HttpKernel] Fix TraceableEventDispatcher when the StopWatch service has been reset
1 parent 1e97a51 commit 714764f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Debug/TraceableEventDispatcher.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ protected function afterDispatch(string $eventName, object $event): void
6666
if (null === $sectionId) {
6767
break;
6868
}
69-
$this->stopwatch->stopSection($sectionId);
69+
try {
70+
$this->stopwatch->stopSection($sectionId);
71+
} catch (\LogicException) {
72+
// The stop watch service might have been reset in the meantime
73+
}
7074
break;
7175
case KernelEvents::TERMINATE:
7276
// In the special case described in the `preDispatch` method above, the `$token` section

0 commit comments

Comments
 (0)