From 825bc9b3d6e4895a8c1473cd25852dad0fe6d5f5 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Wed, 16 Jan 2008 23:37:42 +0000 Subject: fixed a bug if num_link wasn't postive --- system/libraries/Pagination.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'system/libraries') diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 538c42723..76968197d 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -124,6 +124,13 @@ class CI_Pagination { // Prep the current page - no funny business! $this->cur_page = (int) $this->cur_page; } + + $this->num_links = (int)$this->num_links; + + if ($this->num_links < 1) + { + show_error('Your number of links must be a positive number.'); + } if ( ! is_numeric($this->cur_page)) { -- cgit v1.2.3-24-g4f1b