summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/URI.php17
1 files changed, 2 insertions, 15 deletions
diff --git a/system/libraries/URI.php b/system/libraries/URI.php
index 4d0cd9c17..8d979d0d2 100644
--- a/system/libraries/URI.php
+++ b/system/libraries/URI.php
@@ -246,22 +246,9 @@ class CI_URI {
*/
function _reindex_segments()
{
- $i = 1;
-
- foreach ($this->segments as $val)
- {
- $this->segments[$i++] = $val;
- }
-
+ array_unshift($this->segments, NULL);
+ array_unshift($this->rsegments, NULL);
unset($this->segments[0]);
-
- $i = 1;
-
- foreach ($this->rsegments as $val)
- {
- $this->rsegments[$i++] = $val;
- }
-
unset($this->rsegments[0]);
}