Fixes a bug that ignored any overridden path for assets/error-404.html etc

This commit is contained in:
Mark Guinn 2014-09-12 12:21:11 +01:00
parent 12411b7aa3
commit 2fd3231325

View File

@ -347,7 +347,7 @@ class Debug {
class_exists('Translatable') ? Translatable::get_current_locale() : null
);
if(file_exists($errorFilePath)) {
$content = file_get_contents(ASSETS_PATH . "/error-$statusCode.html");
$content = file_get_contents($errorFilePath);
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);