Skip to content

Commit b8ab9ff

Browse files
authored
Merge pull request #29420 from nextcloud/backport/29400/stable21
[stable21] fixes an undefined index when getAccessList returns an empty array
2 parents 7ead027 + d3576d3 commit b8ab9ff

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
@@ -140,7 +140,7 @@ public function isLegitimatedForUserId(string $uid): bool {
140140
return true;
141141
}
142142
$acl = $this->shareManager->getAccessList($node, true, true);
143-
return array_key_exists($uid, $acl['users']);
143+
return isset($acl['users']) && array_key_exists($uid, $acl['users']);
144144
} catch (NotFoundException $e) {
145145
return false;
146146
}

0 commit comments

Comments
 (0)