Skip to content

Commit 8a84905

Browse files
ArtificialOwlmiaulalala
authored andcommitted
notice on empty cachedPath
1 parent f2a659d commit 8a84905

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/FilesHooks.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,12 @@ private function getUnrelatedUsers(int $fileId, array $cachedMounts): array {
13841384
// now that we have a list of eventuals filtered users, we confirm they have no access to the file
13851385
$filteredUsers = [];
13861386
foreach ($usersToCheck as $userId) {
1387+
if (!array_key_exists($userId, $cachedPath) || $cachedPath[$userId] === null) {
1388+
$this->logger->notice('could not find user in list of cached path', ['cachePath' => $cachedPath, 'usersToCheck' => $usersToCheck, 'current' => $userId]);
1389+
$filteredUsers[] = $userId;
1390+
continue;
1391+
}
1392+
13871393
try {
13881394
$node = $this->rootFolder->get($cachedPath[$userId]);
13891395
if ($node->isReadable()) {

0 commit comments

Comments
 (0)