Incorrect array access
authorAlexander Ebert <ebert@woltlab.com>
Tue, 24 Mar 2020 13:57:56 +0000 (14:57 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 24 Mar 2020 13:57:56 +0000 (14:57 +0100)
wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php

index b859bb8cf8d595aea92b37162b2ec877d285d1f5..f7a156ec25bb52912d4ce7f53e9c5f8ce791b83c 100644 (file)
@@ -151,9 +151,9 @@ class UserClipboardAction extends AbstractClipboardAction {
                $userToGroup = $statement->fetchMap('userID', 'groupID', false);
                
                // validate if user's group is accessible for current user
-               foreach ($userIDs as $userID) {
+               foreach ($userIDs as $index => $userID) {
                        if (!isset($userToGroup[$userID]) || !UserGroup::isAccessibleGroup($userToGroup[$userID])) {
-                               unset($userIDs[$userID]);
+                               unset($userIDs[$index]);
                        }
                }