diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index cef98ebf483..9ac9661ad80 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -497,7 +497,7 @@ public function create_links() { $this->cur_page = $this->CI->input->get($this->query_string_segment); } - else + elseif (empty($this->cur_page)) { // Default to the last segment number if one hasn't been defined. if ($this->uri_segment === 0) @@ -512,6 +512,10 @@ public function create_links() { $this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $this->cur_page); } + } + else + { + $this->cur_page = (string) $this->cur_page; } // If something isn't quite right, back to the default base page.