From 02f486ca57c445afc01e143c98378ae1d0ea1a89 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Tue, 9 Jan 2024 11:32:55 +0100 Subject: [PATCH] fix(FileListener->ShareCreatedEvent): Cast userIds to string they might have int type as they come from array keys fixes #1058 Signed-off-by: Marcel Klehr --- lib/Hooks/FileListener.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Hooks/FileListener.php b/lib/Hooks/FileListener.php index 25a6773b..a46b7e63 100644 --- a/lib/Hooks/FileListener.php +++ b/lib/Hooks/FileListener.php @@ -70,10 +70,7 @@ public function handle(Event $event): void { $node = $share->getNode(); $accessList = $this->shareManager->getAccessList($node, true, true); - /** - * @var string[] $userIds - */ - $userIds = array_keys($accessList['users']); + $userIds = array_map(fn ($id) => (string)$id, array_keys($accessList['users'])); if ($node->getType() === FileInfo::TYPE_FOLDER) { $mount = $node->getMountPoint();