From 3d8a1183274136426a83f8787eefadd24727bb62 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Mon, 19 Feb 2024 15:26:55 +0100 Subject: [PATCH] If no style selected use default style --- .../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 4f8bfcddbf..b1db3c4119 100644 --- a/wcfsetup/install/files/lib/system/background/job/ServiceWorkerDeliveryBackgroundJob.class.php +++ b/wcfsetup/install/files/lib/system/background/job/ServiceWorkerDeliveryBackgroundJob.class.php @@ -11,6 +11,7 @@ use wcf\data\user\User; use wcf\system\cache\runtime\UserProfileRuntimeCache; use wcf\system\service\worker\ServiceWorkerHandler; use wcf\system\session\SessionHandler; +use wcf\system\style\StyleHandler; use wcf\system\user\notification\UserNotificationHandler; use wcf\system\WCF; use wcf\util\JSON; @@ -42,6 +43,10 @@ final class ServiceWorkerDeliveryBackgroundJob extends AbstractBackgroundJob } $user = UserProfileRuntimeCache::getInstance()->getObject($serviceWorker->userID); $style = new Style($user->styleID); + if (!$style->styleID) { + $style = StyleHandler::getInstance()->getDefaultStyle(); + } + /** @see NotificationEmailDeliveryBackgroundJob::perform() */ $sql = "SELECT notification.*, notification_event.eventID, object_type.objectType FROM wcf1_user_notification notification -- 2.20.1