32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-11-16 17:45:08 +00:00

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

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;
}