Skip to content

Commit

Permalink
Merge pull request #45158 from nextcloud/backport/45140/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: fix FileAccess::getByFileId(InStorage)
  • Loading branch information
susnux authored May 29, 2024
2 parents 05eb647 + 62e712c commit b3341a1
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 b3341a1

Please sign in to comment.