From: Cyperghost Date: Mon, 19 Feb 2024 14:26:55 +0000 (+0100) Subject: If no style selected use default style X-Git-Tag: 6.1.0_Alpha_1~47^2~80 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d8a1183274136426a83f8787eefadd24727bb62;p=GitHub%2FWoltLab%2FWCF.git If no style selected use default style --- 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