Add missing email status update for deleted notifications
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 6 Sep 2022 11:53:43 +0000 (13:53 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 6 Sep 2022 11:53:43 +0000 (13:53 +0200)
wcfsetup/install/files/lib/system/background/job/NotificationEmailDeliveryBackgroundJob.class.php

index 1efa053c139fa9000aed3d41db4ba4cb14e84479..7d5101c283f844a84657aad651ae3f82534003c9 100644 (file)
@@ -94,6 +94,11 @@ class NotificationEmailDeliveryBackgroundJob extends AbstractBackgroundJob
 
         // Drop email if the notification is deleted.
         if (!$notification || !$notification->notificationID) {
+            $this->job->updateStatus(
+                EmailLogEntry::STATUS_DISCARDED,
+                'notification does not exist'
+            );
+
             return;
         }