]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix empty event UUID reminder notifications 21229/head
authorThomas Citharel <tcit@tcit.fr>
Thu, 4 Jun 2020 09:08:20 +0000 (11:08 +0200)
committerThomas Citharel <tcit@tcit.fr>
Thu, 4 Jun 2020 09:25:36 +0000 (11:25 +0200)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php

index c6b796b2acb5076da4c90a8886562ecf09af8dd4..688e5c3b106ba48c860b7c8e74e285a04177f1f1 100644 (file)
@@ -95,8 +95,10 @@ class PushProvider extends AbstractProvider {
                $eventDetails = $this->extractEventDetails($vevent);
                $eventDetails['calendar_displayname'] = $calendarDisplayName;
                $eventUUID = (string) $vevent->UID;
-               // Empty Notification ObjectId will be catched by OC\Notification\Notification
-               $eventUUIDHash = $eventUUID ? hash('sha256', $eventUUID, false) : '';
+               if (!$eventUUID) {
+                       return;
+               };
+               $eventUUIDHash = hash('sha256', $eventUUID, false);
 
                foreach ($users as $user) {
                        /** @var INotification $notification */