mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Make ModelAsController 404 result more testable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@54635 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ada3a51b4d
commit
98bee3e50f
@ -19,7 +19,11 @@ class ModelAsController extends Controller implements NestedController {
|
||||
|
||||
$this->init();
|
||||
$nested = $this->getNestedController();
|
||||
$result = $nested->run($requestParams);
|
||||
if(is_object($nested)) {
|
||||
$result = $nested->run($requestParams);
|
||||
} else {
|
||||
$result = $nested;
|
||||
}
|
||||
|
||||
$this->popCurrent();
|
||||
return $result;
|
||||
@ -61,7 +65,7 @@ class ModelAsController extends Controller implements NestedController {
|
||||
|
||||
return $controller;
|
||||
} else {
|
||||
die("The requested page couldn't be found.");
|
||||
return "The requested page couldn't be found.";
|
||||
}
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user