Merge pull request #3489 from markguinn/patch-error-path

Fixes a bug that ignored any overridden path for assets/error-404.html (etc)
This commit is contained in:
Sean Harvey 2014-09-12 23:40:07 +12:00
commit 4084da82b2

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);