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:
Michael Vogel 2020-06-30 07:57:23 +02:00 committed by GitHub
commit 75519a7bd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -479,6 +479,11 @@ function notification($params)
'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]);
DI::notify()->update($notification);