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 16, 2024
1 parent bbdcf11 commit 46ae8a7
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 @@ -573,11 +573,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 46ae8a7

Please sign in to comment.