Skip to content

Commit

Permalink
Merge pull request #29419 from nextcloud/backport/29400/stable22
Browse files Browse the repository at this point in the history
[stable22] fixes an undefined index when getAccessList returns an empty array
  • Loading branch information
blizzz authored Oct 23, 2021
2 parents 629225c + 5145675 commit 7fe15c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/workflowengine/lib/Entity/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function isLegitimatedForUserId(string $uid): bool {
return true;
}
$acl = $this->shareManager->getAccessList($node, true, true);
return array_key_exists($uid, $acl['users']);
return isset($acl['users']) && array_key_exists($uid, $acl['users']);
} catch (NotFoundException $e) {
return false;
}
Expand Down

0 comments on commit 7fe15c7

Please sign in to comment.