Fix check for deleted notifications in NotificationEmailDeliveryBackgroundJob
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 11 Jan 2021 15:59:19 +0000 (16:59 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 11 Jan 2021 15:59:38 +0000 (16:59 +0100)
wcfsetup/install/files/lib/system/background/job/NotificationEmailDeliveryBackgroundJob.class.php

index a908942dde23c40bc63e5ba913e30681c4aa4229..96d2a714d1d314c77a2b55354e4a06bbe8d17111 100644 (file)
@@ -85,7 +85,7 @@ class NotificationEmailDeliveryBackgroundJob extends AbstractBackgroundJob {
                $statement->closeCursor();
 
                // Drop email if the notification is deleted.
-               if (!$notification->notificationID) {
+               if (!$notification || !$notification->notificationID) {
                        return;
                }