diff --git a/core/event.class.php b/core/event.class.php index 2f3b84dd..81dda8ee 100644 --- a/core/event.class.php +++ b/core/event.class.php @@ -34,9 +34,7 @@ class PageRequestEvent extends Event { global $config; // trim starting slashes - while(strlen($path) > 0 && $path[0] == '/') { - $path = substr($path, 1); - } + $path = ltrim($path, "/"); // if path is not specified, use the default front page if(strlen($path) === 0) {