Fíx PHP error while accessing non-existant weblink

This commit is contained in:
Manuel Huber 2024-02-07 12:26:13 +01:00 committed by GitHub
parent 52ecfad0eb
commit 0d52f57a7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -174,6 +174,10 @@ class WeblinkModel extends ItemModel
$this->_item[$pk] = $data;
} catch (\Exception $e) {
if ($e->getCode() == 404) {
// Need to go through the error handler to allow Redirect to work.
throw $e;
}
$this->setError($e);
$this->_item[$pk] = false;
}