Merge pull request #8831 from MrPetovan/bug/fatal-errors
Account for false return value of Repository\Notify->insert in notification()
This commit is contained in:
commit
75519a7bd0
1 changed files with 5 additions and 0 deletions
|
@ -479,6 +479,11 @@ function notification($params)
|
||||||
'otype' => $params['otype'] ?? '',
|
'otype' => $params['otype'] ?? '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// Notification insertion can be intercepted by an addon registering the 'enotify_store' hook
|
||||||
|
if (!$notification) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$notification->msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $notification->link]);
|
$notification->msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $notification->link]);
|
||||||
|
|
||||||
DI::notify()->update($notification);
|
DI::notify()->update($notification);
|
||||||
|
|
Loading…
Reference in a new issue