From: Cyperghost Date: Fri, 2 Feb 2024 10:37:28 +0000 (+0100) Subject: Move check to top of function X-Git-Tag: 6.0.9_dev_1~12^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b4c41c09bafefb31f0d0549c7012d65919e13892;p=GitHub%2FWoltLab%2FWCF.git Move check to top of function --- 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();