diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php index 66aa3a6607b9f..67b2cad7ea251 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -362,9 +362,9 @@ public function getMountsForFileId($fileId, $user = null) { return $internalMountPath === '' || str_starts_with($internalPath, $internalMountPath . '/'); }); - $filteredMounts = array_filter($filteredMounts, function (ICachedMountInfo $mount) { + $filteredMounts = array_values(array_filter($filteredMounts, function (ICachedMountInfo $mount) { return $this->userManager->userExists($mount->getUser()->getUID()); - }); + })); return array_map(function (ICachedMountInfo $mount) use ($internalPath) { return new CachedMountFileInfo(