Skip to content

Commit 1ece963

Browse files
author
Henrik Bjornskov
committed
fix exception controller
1 parent 2a71af5 commit 1ece963

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"flint/tacker" : "^1.0",
2525
"twig/twig" : "~1.14",
2626
"doctrine/annotations" : "~1.0",
27-
"symfony/debug-bundle" : "~2.6",
28-
"symfony/http-kernel" : "~2.7"
27+
"symfony/debug-bundle" : "~3.0",
28+
"symfony/http-kernel" : "~3.0"
2929
},
3030

3131
"extra" : {

src/Controller/ExceptionController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public function __invoke(Request $request, FlattenException $exception, $format)
2929
} catch (\Twig_Error_Loader $e) {
3030
$request->setRequestFormat('html');
3131

32-
return (new ExceptionHandler(false))->createResponse($exception);
32+
$content = (new ExceptionHandler(false))->getHtml($exception);
33+
34+
return new Response($content, $exception->getStatusCode(), $exception->getHeaders());
3335
}
3436

3537
// We cannot find a template that matches the precise format so we will default

0 commit comments

Comments
 (0)