From 8d870a32c2aa69d5b0d9475f33b2b526152be613 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 1 May 2024 18:00:20 +0200 Subject: [PATCH] fix: fix FileAccess::getByFileId(InStorage) Signed-off-by: Robin Appelman --- lib/private/Files/Cache/FileAccess.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/Files/Cache/FileAccess.php b/lib/private/Files/Cache/FileAccess.php index a75056a271d..af74a96822b 100644 --- a/lib/private/Files/Cache/FileAccess.php +++ b/lib/private/Files/Cache/FileAccess.php @@ -56,7 +56,7 @@ class FileAccess implements IFileAccess { } public function getByFileIdInStorage(int $fileId, int $storageId): ?CacheEntry { - $items = $this->getByFileIdsInStorage([$fileId], $storageId); + $items = array_values($this->getByFileIdsInStorage([$fileId], $storageId)); return $items[0] ?? null; } @@ -70,7 +70,7 @@ class FileAccess implements IFileAccess { } public function getByFileId(int $fileId): ?CacheEntry { - $items = $this->getByFileIds([$fileId]); + $items = array_values($this->getByFileIds([$fileId])); return $items[0] ?? null; }