NOTFORMERGE: Merged r91209 from branches/2.4

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@91263 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2009-11-11 02:28:45 +00:00
parent 947fcc4060
commit 962109ff8a

View File

@ -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();