summaryrefslogtreecommitdiffstats
path: root/system/core/Config.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Config.php')
-rw-r--r--system/core/Config.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/system/core/Config.php b/system/core/Config.php
index 8250b5b1a..9e6d2cbf2 100644
--- a/system/core/Config.php
+++ b/system/core/Config.php
@@ -245,15 +245,18 @@ class CI_Config {
if ($this->item('enable_query_strings') === FALSE)
{
- $suffix = ($this->item('url_suffix') === FALSE) ? '' : $this->item('url_suffix');
+ $suffix = isset($this->config['url_suffix']) ? (string) $this->config['url_suffix'] : '';
- if ($suffix !== '' && ($offset = strpos($uri, '?')) !== FALSE)
+ if ($suffix !== '')
{
- $uri = substr($uri, 0, $offset).$suffix.substr($uri, $offset);
- }
- else
- {
- $uri .= $suffix;
+ if (($offset = strpos($uri, '?')) !== FALSE)
+ {
+ $uri = substr($uri, 0, $offset).$suffix.substr($uri, $offset);
+ }
+ else
+ {
+ $uri .= $suffix;
+ }
}
return $this->slash_item('base_url').$this->slash_item('index_page').$uri;