diff --git a/lib/FilesHooks.php b/lib/FilesHooks.php index 10958a78a..e2e4b087e 100644 --- a/lib/FilesHooks.php +++ b/lib/FilesHooks.php @@ -929,10 +929,9 @@ protected function unshareFromGroup(IShare $share) { $offset = 0; $users = $group->searchUsers('', self::USER_BATCH_SIZE, $offset); - $users = array_map(fn (IUser $user) => $user->getUID(), $users); $shouldFlush = $this->startActivityTransaction(); while (!empty($users)) { - $userIds = array_map(fn (IUser $user) => $user->getUID(), $users); + $userIds = \array_map(fn (IUser $user) => $user->getUID(), $users); $this->addNotificationsForUsers($userIds, $actionUser, $share->getNodeId(), $share->getNodeType(), $share->getTarget(), (int)$share->getId()); $offset += self::USER_BATCH_SIZE; $users = $group->searchUsers('', self::USER_BATCH_SIZE, $offset);