Fixed custom error pages outputting headers

If we don't have this method called, then the controller returns an object. From then on, [Symfony converts this object in to a string](https://github.com/symfony/HttpFoundation/blob/master/Response.php#L406). This string is **not just the content of the view**, but the headers as well.

After attaching this method, `handleCustomError()` returns a string and everything works as expected.
This commit is contained in:
Matīss Jānis Āboltiņš 2015-04-02 09:59:07 +03:00
parent 0612e652ea
commit 26d92d282f
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ class ErrorHandler extends ErrorHandlerBase
// Route to the CMS error page.
$controller = new Controller($theme);
return $controller->run('/error');
return $controller->run('/error')->getContent();
}
/**