Skip to content

Commit

Permalink
[BUGFUX] Fix #3221: exception in page browser
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryd authored and dkd-kaehm committed Mar 11, 2022
1 parent 74d3163 commit 094e70f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Pagination/ResultsPagination.php
Expand Up @@ -215,8 +215,8 @@ protected function calculatePageRange(): void
if ($numberOfPages > $maxNumberOfLinks) {
$currentPage = $this->paginator->getCurrentPageNumber();
$pagesBeforeAndAfter = ($maxNumberOfLinks - 1) / 2;
$this->pageRangeFirst = $currentPage - floor($pagesBeforeAndAfter);
$this->pageRangeLast = $currentPage + ceil($pagesBeforeAndAfter);
$this->pageRangeFirst = (int)($currentPage - floor($pagesBeforeAndAfter));
$this->pageRangeLast = (int)($currentPage + ceil($pagesBeforeAndAfter));

if ($this->pageRangeFirst < 1) {
$this->pageRangeLast -= $this->pageRangeFirst - 1;
Expand Down

0 comments on commit 094e70f

Please sign in to comment.