diff --git a/classes/Url.php b/classes/Url.php index 5f23a9d..09527b0 100644 --- a/classes/Url.php +++ b/classes/Url.php @@ -99,7 +99,7 @@ class Url { return ''; } - if ($d{0} == '/' && $new_dir{0} != '/') + if ($d[0] == '/' && $new_dir[0] != '/') { $new_dir = '/' . $new_dir; } @@ -108,9 +108,8 @@ class Url $new_dir .= '/'; } else if (DirectoryList::is_hidden(Item::get_basename($new_dir))) - //it's a file, so make sure the file itself is not hidden { - return DirItem::get_parent_dir($new_dir); + return DirItem::get_parent_dir($new_dir); //it's a file, so make sure the file itself is not hidden } return $new_dir; } @@ -226,4 +225,4 @@ class Url } } -?> \ No newline at end of file +?>