Skip to content

Commit 4cc6701

Browse files
Messj1miaulalala
authored andcommitted
changes accesslist default result from empty array to skeleton
uses same skeleton as in nextcloud server sharehelper to prevent access array offset errors Signed-off-by: Jan Messer <jan@mtec-studios.ch>
1 parent ecb9b52 commit 4cc6701

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/FilesHooks.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,11 +578,17 @@ protected function getUserPathsFromPath($path, $uidOwner) {
578578
try {
579579
$node = $this->rootFolder->getUserFolder($uidOwner)->get($path);
580580
} catch (NotFoundException $e) {
581-
return [];
581+
return [
582+
'users' => [],
583+
'remotes' => [],
584+
];
582585
}
583586

584587
if (!$node instanceof Node) {
585-
return [];
588+
return [
589+
'users' => [],
590+
'remotes' => [],
591+
];
586592
}
587593

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

0 commit comments

Comments
 (0)