Skip to content

Commit fb10db1

Browse files
committed
[HttpKernel] Fix TraceableEventDispatcher when the StopWatch service has been reset
1 parent 627f373 commit fb10db1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php

Lines changed: 5 additions & 1 deletion
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)