Skip to content

Commit

Permalink
fix(FileListener->ShareCreatedEvent): Cast userIds to string
Browse files Browse the repository at this point in the history
they might have int type as they come from array keys

fixes #1058

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Jan 9, 2024
1 parent 4a658b4 commit 02f486c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/Hooks/FileListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 02f486c

Please sign in to comment.