From 35db460f523ffa05e099cdd22dfc69651c0a7ce2 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Fri, 2 Feb 2024 11:37:28 +0100 Subject: [PATCH] Move check to top of function --- .../user/notification/UserNotificationHandler.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php index 9c08223941..6d90f2480e 100644 --- a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php @@ -105,6 +105,9 @@ class UserNotificationHandler extends SingletonFactory if (!isset($this->availableEvents[$objectType][$eventName])) { throw new SystemException("Unknown event " . $objectType . "-" . $eventName . " given"); } + if ($recipientIDs === []) { + return; + } // get objects $objectTypeObject = $this->availableObjectTypes[$objectType]; @@ -141,9 +144,6 @@ class UserNotificationHandler extends SingletonFactory // @deprecated 5.2 This event exposes incomplete data and should not // be used, please use the following events instead. EventHandler::getInstance()->fireAction($this, 'fireEvent', $parameters); - if ($recipientIDs === []) { - return; - } // find existing notifications $conditions = new PreparedStatementConditionBuilder(); -- 2.20.1