Skip to content

Commit

Permalink
Merge pull request #45140 from nextcloud/fix-fileaccess-single
Browse files Browse the repository at this point in the history
fix: fix FileAccess::getByFileId(InStorage)
  • Loading branch information
kesselb authored May 2, 2024
2 parents 6ead79e + 8d870a3 commit dbd2bc7
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 dbd2bc7

Please sign in to comment.