diff --git a/lib/Cake/Controller/Component/PaginatorComponent.php b/lib/Cake/Controller/Component/PaginatorComponent.php index 5f9fb523d..f8349bc73 100644 --- a/lib/Cake/Controller/Component/PaginatorComponent.php +++ b/lib/Cake/Controller/Component/PaginatorComponent.php @@ -197,7 +197,9 @@ class PaginatorComponent extends Component { $defaults = $this->getDefaults($object->alias); unset($defaults[0]); - if ($object->hasMethod('paginateCount')) { + if (!$results) { + $count = 0; + } elseif ($object->hasMethod('paginateCount')) { $count = $object->paginateCount($conditions, $recursive, $extra); } else { $parameters = compact('conditions');