Skip to content

Commit dbd2bc7

Browse files
authored
Merge pull request #45140 from nextcloud/fix-fileaccess-single
fix: fix FileAccess::getByFileId(InStorage)
2 parents 6ead79e + 8d870a3 commit dbd2bc7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/private/Files/Cache/FileAccess.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private function getQuery(): CacheQueryBuilder {
5656
}
5757

5858
public function getByFileIdInStorage(int $fileId, int $storageId): ?CacheEntry {
59-
$items = $this->getByFileIdsInStorage([$fileId], $storageId);
59+
$items = array_values($this->getByFileIdsInStorage([$fileId], $storageId));
6060
return $items[0] ?? null;
6161
}
6262

@@ -70,7 +70,7 @@ public function getByPathInStorage(string $path, int $storageId): ?CacheEntry {
7070
}
7171

7272
public function getByFileId(int $fileId): ?CacheEntry {
73-
$items = $this->getByFileIds([$fileId]);
73+
$items = array_values($this->getByFileIds([$fileId]));
7474
return $items[0] ?? null;
7575
}
7676

0 commit comments

Comments
 (0)