Fixed negative offsets in AbstractDao
This commit is contained in:
parent
31e0158606
commit
6f563e72c3
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ abstract class AbstractDao implements ICrudDao
|
|||
if ($searchFilter->getPageSize() > 0)
|
||||
{
|
||||
$query->limit($searchFilter->getPageSize());
|
||||
$query->offset($searchFilter->getPageSize() * ($searchFilter->getPageNumber() - 1));
|
||||
$query->offset($searchFilter->getPageSize() * max(0, $searchFilter->getPageNumber() - 1));
|
||||
}
|
||||
$entities = $this->arrayToEntities(iterator_to_array($query));
|
||||
|
||||
|
|
Loading…
Reference in a new issue