diff --git a/dev/Debug.php b/dev/Debug.php index c17d68c82..46a0c430f 100644 --- a/dev/Debug.php +++ b/dev/Debug.php @@ -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); }