BUGFIX Since ModelAsController->handleRequest() expects a URLSegment, we make the ErrorPage Link() return a relative URLSegment in ErrorPage->publish()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@67304 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-12-03 11:41:33 +00:00 committed by Sam Minnee
parent 9cf909e6ca
commit 90fb060b58

View File

@ -97,7 +97,7 @@ class ErrorPage extends Page {
$oldStage = Versioned::current_stage();
// Run the page
$response = Director::test($this->Link());
$response = Director::test(Director::makeRelative($this->Link()));
$errorContent = $response->getBody();
if(!file_exists(ASSETS_PATH)) {
@ -130,6 +130,7 @@ class ErrorPage extends Page {
class ErrorPage_Controller extends Page_Controller {
public function init() {
parent::init();
Director::set_status_code($this->failover->ErrorCode ? $this->failover->ErrorCode : 404);
}
}