trim leading slashes more efficiently
This commit is contained in:
parent
19c0868b2c
commit
df2f90016f
1 changed files with 1 additions and 3 deletions
|
@ -34,9 +34,7 @@ class PageRequestEvent extends Event {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
// trim starting slashes
|
// trim starting slashes
|
||||||
while(strlen($path) > 0 && $path[0] == '/') {
|
$path = ltrim($path, "/");
|
||||||
$path = substr($path, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// if path is not specified, use the default front page
|
// if path is not specified, use the default front page
|
||||||
if(strlen($path) === 0) {
|
if(strlen($path) === 0) {
|
||||||
|
|
Reference in a new issue