Skip to content

Commit

Permalink
[Pagerfanta] Fixed LSE total count regression when there's no count t…
Browse files Browse the repository at this point in the history
…o perform
  • Loading branch information
alongosz committed Dec 12, 2024
1 parent 7d97e72 commit 014a41d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/Search/Legacy/Content/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function findContent(Query $query, array $languageFilter = []): SearchRes
/** @phpstan-var \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult<\Ibexa\Contracts\Core\Persistence\Content\ContentInfo> $result */
$result = new SearchResult();
$result->time = (int) (microtime(true) - $start) * 1000; // time expressed in ms
$result->totalCount = $data['count'] !== null ? (int)$data['count'] : 0;
$result->totalCount = $data['count'] !== null ? (int)$data['count'] : null;
$contentInfoList = $this->contentMapper->extractContentInfoFromRows(
$data['rows'],
'',
Expand Down Expand Up @@ -228,7 +228,7 @@ public function findLocations(LocationQuery $query, array $languageFilter = []):
/** @phpstan-var \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult<\Ibexa\Contracts\Core\Persistence\Content\Location> $result */
$result = new SearchResult();
$result->time = (int) (microtime(true) - $start) * 1000; // time expressed in ms
$result->totalCount = $data['count'] !== null ? (int)$data['count'] : 0;
$result->totalCount = $data['count'] !== null ? (int)$data['count'] : null;
$locationList = $this->locationMapper->createLocationsFromRows($data['rows']);

foreach ($locationList as $index => $location) {
Expand Down

0 comments on commit 014a41d

Please sign in to comment.