summaryrefslogtreecommitdiffstats
path: root/system/libraries/Pagination.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Pagination.php')
-rw-r--r--system/libraries/Pagination.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index ae8dba072..66b341760 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -460,13 +460,15 @@ class CI_Pagination {
// Unset the controll, method, old-school routing options
unset($get['c'], $get['m'], $get[$this->query_string_segment]);
- if ( ! $get) $get = array();
-
- // Put everything else onto the end
- $query_string = (strpos($this->base_url, '&') !== FALSE ? '&' : '?') . http_build_query($get, '', '&');
+ if ( ! empty($get))
+ {
+ // Put everything else onto the end
+ $query_string = (strpos($this->base_url, '?') !== FALSE ? '&' : '?')
+ .http_build_query($get, '', '&');
- // Add this after the suffix to put it into more links easily
- $this->suffix .= $query_string;
+ // Add this after the suffix to put it into more links easily
+ $this->suffix .= $query_string;
+ }
}
// Render the "First" link