Skip to content

Commit 2b651cc

Browse files
authored
Merge pull request #29400 from nextcloud/fix/noid/undef-index-error
fixes an undefined index when getAccessList returns an empty array
2 parents f4e4a85 + 7d7ef1d commit 2b651cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/workflowengine/lib/Entity/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function isLegitimatedForUserId(string $uid): bool {
141141
return true;
142142
}
143143
$acl = $this->shareManager->getAccessList($node, true, true);
144-
return array_key_exists($uid, $acl['users']);
144+
return isset($acl['users']) && array_key_exists($uid, $acl['users']);
145145
} catch (NotFoundException $e) {
146146
return false;
147147
}

0 commit comments

Comments
 (0)