mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Return correct error when 404 page doesn't exist and page is not found.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91209 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
654af798ee
commit
e2a3cb2e20
@ -49,10 +49,14 @@ class ModelAsController extends Controller implements NestedController {
|
||||
return $this->response;
|
||||
}
|
||||
|
||||
$result = $this->getNestedController();
|
||||
try {
|
||||
$result = $this->getNestedController();
|
||||
|
||||
if($result instanceof RequestHandler) {
|
||||
$result = $result->handleRequest($this->request);
|
||||
if($result instanceof RequestHandler) {
|
||||
$result = $result->handleRequest($this->request);
|
||||
}
|
||||
} catch(SS_HTTPResponse_Exception $responseException) {
|
||||
$result = $responseException->getResponse();
|
||||
}
|
||||
|
||||
$this->popCurrent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user