summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/core/URI.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/core/URI.php b/system/core/URI.php
index 8d0d8fddc..9b31a646b 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -358,11 +358,11 @@ class CI_URI {
return;
}
- $offset = strrpos($this->uri_string, $suffix);
+ $slen = strlen($suffix);
- if ($offset !== FALSE && $offset === strlen($this->uri_string) - strlen($suffix))
+ if (substr($this->uri_string, -$slen) === $suffix)
{
- $this->uri_string = substr($this->uri_string, 0, $offset);
+ $this->uri_string = substr($this->uri_string, 0, -$slen);
}
}