mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
9cf909e6ca
commit
90fb060b58
@ -97,7 +97,7 @@ class ErrorPage extends Page {
|
|||||||
$oldStage = Versioned::current_stage();
|
$oldStage = Versioned::current_stage();
|
||||||
|
|
||||||
// Run the page
|
// Run the page
|
||||||
$response = Director::test($this->Link());
|
$response = Director::test(Director::makeRelative($this->Link()));
|
||||||
$errorContent = $response->getBody();
|
$errorContent = $response->getBody();
|
||||||
|
|
||||||
if(!file_exists(ASSETS_PATH)) {
|
if(!file_exists(ASSETS_PATH)) {
|
||||||
@ -130,6 +130,7 @@ class ErrorPage extends Page {
|
|||||||
class ErrorPage_Controller extends Page_Controller {
|
class ErrorPage_Controller extends Page_Controller {
|
||||||
public function init() {
|
public function init() {
|
||||||
parent::init();
|
parent::init();
|
||||||
|
|
||||||
Director::set_status_code($this->failover->ErrorCode ? $this->failover->ErrorCode : 404);
|
Director::set_status_code($this->failover->ErrorCode ? $this->failover->ErrorCode : 404);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user