fix bug in paginator.

This commit is contained in:
Taylor Otwell 2012-02-08 11:16:55 -06:00
parent e88d2213ab
commit 5e59a72b5b
1 changed files with 3 additions and 1 deletions

View File

@ -679,7 +679,9 @@ public function paginate($per_page = 20, $columns = array('*'))
// retrieved the count from the table.
list($orderings, $this->orderings) = array($this->orderings, null);
$page = Paginator::page($total = $this->count($columns), $per_page);
$total = $this->count(reset($columns));
$page = Paginator::page($total, $per_page);
$this->orderings = $orderings;