summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-01-17 00:37:42 +0100
committerDerek Allard <derek.allard@ellislab.com>2008-01-17 00:37:42 +0100
commit825bc9b3d6e4895a8c1473cd25852dad0fe6d5f5 (patch)
treec889beda9eeb6bd7b0e6b81121ca7807e118aa46
parent47845f201626e4e2751bd73cd5823f334f47e43d (diff)
fixed a bug if num_link wasn't postive
-rw-r--r--system/libraries/Pagination.php7
1 files changed, 7 insertions, 0 deletions
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))
{