From eb4fb994cf9162cb45a7909d5d5fa95b3b362afc Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 30 Jul 2024 16:32:36 +0200 Subject: fix: ensure array returned from getMountsForFileId is continious Signed-off-by: Robin Appelman --- lib/private/Files/Config/UserMountCache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/private/Files/Config/UserMountCache.php') diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php index 66aa3a6607b..67b2cad7ea2 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -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( -- cgit v1.2.3