Fix index.php redirecting infinitely if root is `/`

This commit is contained in:
Lukas Rieger (Blue) 2022-09-09 23:13:03 +02:00
parent f5426ceac3
commit 0dc79bb9ad
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ function startsWith($haystack, $needle) {
// determine relative request-path
$root = dirname($_SERVER['PHP_SELF']);
if ($root === "/") $root = "";
$uriPath = $_SERVER['REQUEST_URI'];
$path = substr($uriPath, strlen($root));