mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Allow execution of actions (such as Page's search) on ErrorPage; limit the 404 display to the index() action
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@75096 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8a1d21b8af
commit
35a3cd9257
@ -133,7 +133,7 @@ class RequestHandler extends ViewableData {
|
||||
|
||||
// But if we have more content on the URL and we don't know what to do with it, return an error.
|
||||
} else {
|
||||
return $this->httpError(400, "I can't handle sub-URLs of a $this->class object.");
|
||||
return $this->httpError(404, "I can't handle sub-URLs of a $this->class object.");
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -183,9 +183,7 @@ class ErrorPage extends Page {
|
||||
* @package cms
|
||||
*/
|
||||
class ErrorPage_Controller extends Page_Controller {
|
||||
public function init() {
|
||||
parent::init();
|
||||
|
||||
public function index() {
|
||||
Director::set_status_code($this->failover->ErrorCode ? $this->failover->ErrorCode : 404);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user