mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
Merge pull request #1039 from dnadesign/fixpopcurrentwarning
FIX ensure controller stack is updated when execution halted by an exception
This commit is contained in:
commit
5107b08ac1
@ -193,8 +193,18 @@ class ContentController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Director::set_current_page($this->data());
|
Director::set_current_page($this->data());
|
||||||
|
|
||||||
|
try {
|
||||||
$response = parent::handleRequest($request, $model);
|
$response = parent::handleRequest($request, $model);
|
||||||
|
|
||||||
Director::set_current_page(null);
|
Director::set_current_page(null);
|
||||||
|
} catch(SS_HTTPResponse_Exception $e) {
|
||||||
|
$this->popCurrent();
|
||||||
|
|
||||||
|
Director::set_current_page(null);
|
||||||
|
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user