From: Alexander Ebert Date: Thu, 15 Aug 2024 10:00:58 +0000 (+0200) Subject: Fix the handling of users that do not exist anymore X-Git-Tag: 6.1.0_Alpha_2~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d60ba903c06d9ea2953756f077cb93616f640644;p=GitHub%2FWoltLab%2FWCF.git Fix the handling of users that do not exist anymore --- 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();