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:
Samuel Georges 2015-04-11 11:19:53 +10:00
parent ebcf57e8e3
commit f0c7b66576
1 changed files with 8 additions and 1 deletions

View File

@ -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;
}
/**