Some simple tweaking
diff --git a/system/core/URI.php b/system/core/URI.php
index b36593b..5a5a37c 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -482,21 +482,18 @@
*/
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;
}