Catch fatal errors after cycling page action

This is a complex issues where a "model not found" exception is getting thrown during the `pageAction` cycle, then getting suppressed by the fatal error handler:

try {
    // RelationController throws error here
}
catch (Exception $ex) {
    $this->controller->handleError($ex);
}

Fixes #4784
This commit is contained in:
Samuel Georges 2019-12-29 15:40:28 +11:00
parent e19f8b287d
commit 321f7eaa1f
1 changed files with 4 additions and 0 deletions

View File

@ -290,6 +290,10 @@ class RelationController extends ControllerBehavior
}
$this->controller->pageAction();
if ($fatalError = $this->controller->getFatalError()) {
throw new ApplicationException($fatalError);
}
$this->validateField();
$this->prepareVars();
$this->initialized = true;