summaryrefslogtreecommitdiffstats
path: root/system/core/URI.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/URI.php')
-rw-r--r--system/core/URI.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/system/core/URI.php b/system/core/URI.php
index b36593bc0..5a5a37cc6 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -482,21 +482,18 @@ class CI_URI {
*/
function _slash_segment($n, $where = 'trailing', $which = 'segment')
{
+ $leading = '/';
+ $trailing = '/';
+
if ($where == 'trailing')
{
- $trailing = '/';
$leading = '';
}
elseif ($where == 'leading')
{
- $leading = '/';
$trailing = '';
}
- else
- {
- $leading = '/';
- $trailing = '/';
- }
+
return $leading.$this->$which($n).$trailing;
}