Merge pull request #1820 from appleboy/pagination

Fixed #1817 Pagination class error
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 4fa605c..e1e729b 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -215,7 +215,8 @@
 		// string. If post, add a trailing slash to the base URL if needed
 		if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
 		{
-			$this->base_url = rtrim($this->base_url).'&'.$this->query_string_segment.'=';
+			$segment = (strpos($this->base_url, '?')) ? '&' : '?';
+			$this->base_url = rtrim($this->base_url).$segment.$this->query_string_segment.'=';
 		}
 		else
 		{