Commit 85e26cfd authored by guilhermeblanco's avatar guilhermeblanco

Fixed method getNextPage that was always returning the last page in all branches

parent 6ed10e06
......@@ -270,12 +270,12 @@ class Doctrine_Pager
public function getNextPage()
{
if ($this->getExecuted()) {
return $this->_lastPage;
return min($this->getPage() + 1, $this->getLastPage());
}
throw new Doctrine_Pager_Exception(
'Cannot retrieve the last page number of a not yet executed Pager query'
);return min($this->getPage() + 1, $this->getLastPage());
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment