File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/Symfony/Component/HttpKernel/Debug Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,18 @@ public function handle(\Exception $exception)
67
67
/**
68
68
* Creates the error Response associated with the given Exception.
69
69
*
70
- * @param \Exception $exception An \Exception instance
70
+ * @param \Exception|FlattenException $exception An \Exception instance
71
71
*
72
72
* @return Response A Response instance
73
73
*/
74
- public function createResponse (\ Exception $ exception )
74
+ public function createResponse ($ exception )
75
75
{
76
76
$ content = '' ;
77
77
$ title = '' ;
78
78
try {
79
- $ exception = FlattenException::create ($ exception );
79
+ if (!$ exception instanceof FlattenException) {
80
+ $ exception = FlattenException::create ($ exception );
81
+ }
80
82
81
83
switch ($ exception ->getStatusCode ()) {
82
84
case 404 :
You can’t perform that action at this time.
0 commit comments