mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02: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());
|
||||
|
||||
try {
|
||||
$response = parent::handleRequest($request, $model);
|
||||
|
||||
Director::set_current_page(null);
|
||||
} catch(SS_HTTPResponse_Exception $e) {
|
||||
$this->popCurrent();
|
||||
|
||||
Director::set_current_page(null);
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
return $response;
|
||||
|
Loading…
Reference in New Issue
Block a user