Fixed issue 6

This commit is contained in:
Ed 2012-08-19 14:43:20 -03:00
parent 35f2a5a463
commit 2633ac7ecb
1 changed files with 2 additions and 1 deletions

View File

@ -211,7 +211,8 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
if ($paginator = $gridField->getConfig()->getComponentsByType('GridFieldPaginator')->First()) {
$pageState = $gridField->State->GridFieldPaginator;
if($pageState->currentPage && $pageState->currentPage>1) {
if($pageState->currentPage && is_int($pageState->currentPage) && $pageState->currentPage>1) {
$pageOffset = $paginator->getItemsPerPage() * ($pageState->currentPage - 1);
}
}