Fix url parsing

This commit is contained in:
osaajani 2024-02-26 12:07:03 +01:00
parent 6e6c51a9ee
commit 064d6fd941
2 changed files with 2 additions and 7 deletions

View File

@ -1 +1 @@
v3.9.0
v3.9.1

View File

@ -72,12 +72,7 @@
protected static function clean_url (string $url)
{
$to_remove = parse_url(HTTP_PWD, PHP_URL_PATH);
if ($to_remove === null)
{
return $url;
}
$url = mb_strcut($url, mb_strlen($to_remove));
$url = mb_strcut($url, $to_remove ? mb_strlen($to_remove) : 0);
$url = parse_url($url, PHP_URL_PATH);
return $url;