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:
parent
52ecfad0eb
commit
0d52f57a7b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user