Skip to content

Commit

Permalink
fix: fix FileAccess::getByFileId(InStorage)
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed May 1, 2024
1 parent d82fb01 commit 8d870a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Files/Cache/FileAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private function getQuery(): CacheQueryBuilder {
}

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

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

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

Expand Down

0 comments on commit 8d870a3

Please sign in to comment.