]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix empty event UUID reminder notifications 21248/head
authorThomas Citharel <tcit@tcit.fr>
Thu, 4 Jun 2020 09:08:20 +0000 (11:08 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Fri, 5 Jun 2020 07:07:51 +0000 (07:07 +0000)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php

index 7e560159950aff7df8fa39fb406c5b5cd6342647..1bd79f0b20fcee127a50f8d8da58fd7b09aff804 100644 (file)
@@ -94,8 +94,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 */