Skip to content

Commit 1ad842d

Browse files
committed
Fix last merge
1 parent 55cda8a commit 1ad842d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Bridge/Doctrine/Orm/Paginator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ final class Paginator extends AbstractPaginator implements PaginatorInterface
3232
*/
3333
public function getLastPage(): float
3434
{
35+
if (0 >= $this->maxResults) {
36+
return 1;
37+
}
38+
3539
return ceil($this->getTotalItems() / $this->maxResults) ?: 1.;
3640
}
3741

0 commit comments

Comments
 (0)