Fixed method getNextPage that was always returning the last page in all branches
This commit is contained in:
parent
6ed10e06ed
commit
85e26cfd7b
@ -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());
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user