Adds minor safeguard to #1044
^- For objects that can be cast as strings and do not interface Symfony's Response
This commit is contained in:
parent
ebcf57e8e3
commit
f0c7b66576
|
|
@ -49,7 +49,14 @@ class ErrorHandler extends ErrorHandlerBase
|
|||
|
||||
// Route to the CMS error page.
|
||||
$controller = new Controller($theme);
|
||||
return $controller->run('/error')->getContent();
|
||||
$result = $controller->run('/error');
|
||||
|
||||
// Extract content from response object
|
||||
if ($result instanceof \Symfony\Component\HttpFoundation\Response) {
|
||||
$result = $result->getContent();
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue