Skip to content

Commit

Permalink
changes accesslist default result from empty array to skeleton
Browse files Browse the repository at this point in the history
uses same skeleton as in nextcloud server sharehelper to prevent access array offset errors

Signed-off-by: Jan Messer <[email protected]>
  • Loading branch information
Messj1 committed Jul 17, 2024
1 parent e22ba18 commit e63aa5f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/FilesHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,11 +576,17 @@ protected function getUserPathsFromPath($path, $uidOwner) {
try {
$node = $this->rootFolder->getUserFolder($uidOwner)->get($path);
} catch (NotFoundException $e) {
return [];
return [
'users' => [],
'remotes' => [],
];
}

if (!$node instanceof Node) {
return [];
return [
'users' => [],
'remotes' => [],
];
}

$accessList = $this->shareHelper->getPathsForAccessList($node);
Expand Down

0 comments on commit e63aa5f

Please sign in to comment.