Skip to content

Commit

Permalink
fix(StorageService#getMounts): Avoid variable leakage
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Dec 4, 2023
1 parent 57452f7 commit 7d45a66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Service/StorageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ public function getMounts(): \Generator {
// Only crawl files, not cache or trashbin
$qb = new CacheQueryBuilder($this->db, $this->systemConfig, $this->logger, $this->metadataManager);
try {
$result = $qb->selectFileCache()
$res = $qb->selectFileCache()
->andWhere($qb->expr()->eq('filecache.storage', $qb->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
->andWhere($qb->expr()->eq('filecache.path', $qb->createNamedParameter('files')))
->executeQuery();
/** @var array|false $root */
$root = $result->fetch();
$result->closeCursor();
$root = $res->fetch();
$res->closeCursor();
if ($root !== false) {
$overrideRoot = intval($root['fileid']);
}
Expand Down

0 comments on commit 7d45a66

Please sign in to comment.