Fixed JobPager - returns integers, not floats

This commit is contained in:
Marcin Kurczewski 2014-05-13 14:00:51 +02:00
parent 4b907f6121
commit d30dd3c05a

View file

@ -36,15 +36,15 @@ class JobPager
$pageSize = $this->getPageSize(); $pageSize = $this->getPageSize();
$pageNumber = $this->getPageNumber(); $pageNumber = $this->getPageNumber();
$pageCount = ceil($totalEntityCount / $pageSize); $pageCount = (int) ceil($totalEntityCount / $pageSize);
$pageNumber = $this->getPageNumber(); $pageNumber = $this->getPageNumber();
$pageNumber = min($pageCount, $pageNumber); $pageNumber = min($pageCount, $pageNumber);
$ret = new StdClass; $ret = new StdClass;
$ret->entities = $entities; $ret->entities = $entities;
$ret->entityCount = $totalEntityCount; $ret->entityCount = (int) $totalEntityCount;
$ret->page = $pageNumber; $ret->page = (int) $pageNumber;
$ret->pageCount = $pageCount; $ret->pageCount = (int) $pageCount;
return $ret; return $ret;
} }
} }