From d60ba903c06d9ea2953756f077cb93616f640644 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 15 Aug 2024 12:00:58 +0200 Subject: [PATCH] Fix the handling of users that do not exist anymore --- .../job/ServiceWorkerDeliveryBackgroundJob.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/lib/system/background/job/ServiceWorkerDeliveryBackgroundJob.class.php b/wcfsetup/install/files/lib/system/background/job/ServiceWorkerDeliveryBackgroundJob.class.php index 8be21b399f..3cdd7da3a3 100644 --- a/wcfsetup/install/files/lib/system/background/job/ServiceWorkerDeliveryBackgroundJob.class.php +++ b/wcfsetup/install/files/lib/system/background/job/ServiceWorkerDeliveryBackgroundJob.class.php @@ -58,6 +58,11 @@ final class ServiceWorkerDeliveryBackgroundJob extends AbstractUniqueBackgroundJ { $serviceWorker = new ServiceWorker($serviceWorkerID); $user = UserProfileRuntimeCache::getInstance()->getObject($serviceWorker->userID); + if ($user === null) { + // The user does not exist anymore. + return; + } + $style = new Style($user->styleID); if (!$style->styleID) { $style = StyleHandler::getInstance()->getStyle(); -- 2.20.1