Skip to content

Commit

Permalink
bug #1875 Fixed the Doctrine ORM adapter used by the paginator (javie…
Browse files Browse the repository at this point in the history
…reguiluz)

This PR was merged into the 1.16.x-dev branch.

Discussion
----------

Fixed the Doctrine ORM adapter used by the paginator

This fixes #1871.

Commits
-------

28183f9 Fixed the Doctrine ORM adapter used by the paginator
  • Loading branch information
javiereguiluz committed Oct 20, 2017
2 parents cf48848 + 28183f9 commit 4320725
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Search/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class Paginator
*/
public function createOrmPaginator($queryBuilder, $page = 1, $maxPerPage = self::MAX_ITEMS)
{
$paginator = new Pagerfanta(new DoctrineORMAdapter($queryBuilder));
// don't change the following line (you did that twice in the past and broke everything)
$paginator = new Pagerfanta(new DoctrineORMAdapter($queryBuilder, true, false));
$paginator->setMaxPerPage($maxPerPage);
$paginator->setCurrentPage($page);

Expand Down

0 comments on commit 4320725

Please sign in to comment.