diff options
Diffstat (limited to 'core/libraries')
-rw-r--r-- | core/libraries/Theme_View.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/core/libraries/Theme_View.php b/core/libraries/Theme_View.php index ea2a17f9..e992103f 100644 --- a/core/libraries/Theme_View.php +++ b/core/libraries/Theme_View.php @@ -122,13 +122,15 @@ class Theme_View_Core extends View { } public function pager() { - $this->pagination = new Pagination(); - $this->pagination->initialize( - array('query_string' => 'page', - 'total_items' => $this->children_count, - 'items_per_page' => $this->page_size, - 'style' => 'classic')); - return $this->pagination->render(); + if ($this->children_count) { + $this->pagination = new Pagination(); + $this->pagination->initialize( + array('query_string' => 'page', + 'total_items' => $this->children_count, + 'items_per_page' => $this->page_size, + 'style' => 'classic')); + return $this->pagination->render(); + } } /** |