]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: ensure array returned from getMountsForFileId is continious 46886/head
authorRobin Appelman <robin@icewind.nl>
Tue, 30 Jul 2024 14:32:36 +0000 (16:32 +0200)
committerRobin Appelman <robin@icewind.nl>
Fri, 2 Aug 2024 15:22:33 +0000 (17:22 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Files/Config/UserMountCache.php

index 66aa3a6607b9f6bc1fbc23d051191409305f32eb..67b2cad7ea2515d0b379232f6246d2a4aa08a42c 100644 (file)
@@ -362,9 +362,9 @@ class UserMountCache implements IUserMountCache {
                        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(