From 26d92d282f9f227ce62a60d419c83dd1c4b4bbcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=ABss=20J=C4=81nis=20=C4=80bolti=C5=86=C5=A1?= Date: Thu, 2 Apr 2015 09:59:07 +0300 Subject: [PATCH] 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. --- modules/system/classes/ErrorHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/classes/ErrorHandler.php b/modules/system/classes/ErrorHandler.php index 4de649faf..43af29373 100644 --- a/modules/system/classes/ErrorHandler.php +++ b/modules/system/classes/ErrorHandler.php @@ -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(); } /**