Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 10c5ffb

Browse files
Revert "[HttpKernel] Throw a LogicException when kernel.exception does not led to a Response"
This partially reverts commit 22f4807.
1 parent c16930f commit 10c5ffb

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/Symfony/Component/HttpKernel/HttpKernel.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,6 @@ private function handleException(\Exception $e, $request, $type)
229229
if (!$event->hasResponse()) {
230230
$this->finishRequest($request, $type);
231231

232-
if ($this->dispatcher->hasListeners(KernelEvents::EXCEPTION)) {
233-
throw new \LogicException('No listeners of the "kernel.exception" event set a Response', 0, $e);
234-
}
235-
236232
throw $e;
237233
}
238234

src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function testHandleWhenNoControllerIsFound()
151151
$dispatcher = new EventDispatcher();
152152
$kernel = new HttpKernel($dispatcher, $this->getResolver(false));
153153

154-
$kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, false);
154+
$kernel->handle(new Request());
155155
}
156156

157157
/**

0 commit comments

Comments
 (0)