summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-22 12:23:25 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-22 12:23:25 +0100
commit2b241399a7b1978ca7992e0a0162599408fabb9b (patch)
tree4a9bfdb67cdf53394864da4ad724753583b41ed9
parent7ade8b7944d10f4fd1583789309cf003a3eac6f7 (diff)
Manually apply a fix submitted via PR #2012, #2016
-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, '&amp;') !== FALSE ? '&amp;' : '?') . http_build_query($get, '', '&amp;');
+ if ( ! empty($get))
+ {
+ // Put everything else onto the end
+ $query_string = (strpos($this->base_url, '?') !== FALSE ? '&amp;' : '?')
+ .http_build_query($get, '', '&amp;');
- // 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