Merge pull request #4850 from tractorcow/pulls/4.0/fix-response-errors

BUG Fix incorrect error page handling
This commit is contained in:
Sam Minnée 2015-12-15 15:49:46 +13:00
commit e67db6d95a

View File

@ -271,7 +271,7 @@ EOT
// an error, and the response doesn't have any body yet that might contain
// a more specific error description.
if(Director::isLive() && $this->isError() && !$this->body) {
$formatter = Injector::get('FriendlyErrorFormatter');
$formatter = Injector::inst()->get('FriendlyErrorFormatter');
echo $formatter->format(array(
'code' => $this->statusCode
));