Merge pull request #2674 from chillu/pulls/friendlyerror-contenttype

FIX text/html type for Debug::friendlyError() in live mode
This commit is contained in:
Sean Harvey 2013-11-18 12:09:59 -08:00
commit be99d1532b

View File

@ -347,6 +347,7 @@ class Debug {
);
if(file_exists($errorFilePath)) {
$content = file_get_contents(ASSETS_PATH . "/error-$statusCode.html");
if(!headers_sent()) header('Content-Type: text/html');
// $BaseURL is left dynamic in error-###.html, so that multi-domain sites don't get broken
echo str_replace('$BaseURL', Director::absoluteBaseURL(), $content);
}