From: Hypolite Petovan Date: Mon, 29 Jun 2020 22:58:17 +0000 (-0400) Subject: Account for false return value of Repository\Notify->insert in notification() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a3e775f28cc14cac603c8fff81074b636337f4b1;p=friendica.git Account for false return value of Repository\Notify->insert in notification() - Address https://github.com/friendica/friendica/issues/8473#issuecomment-651393541 --- diff --git a/include/enotify.php b/include/enotify.php index 89a81833d0..6b3171dda6 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -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);