Skip to content

Commit

Permalink
Merge pull request #29421 from nextcloud/backport/29400/stable20
Browse files Browse the repository at this point in the history
[stable20] fixes an undefined index when getAccessList returns an empty array
  • Loading branch information
MichaIng authored Oct 24, 2021
2 parents c45316f + 916b2e7 commit 8faaeda
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 @@ -140,7 +140,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 8faaeda

Please sign in to comment.