Fix url parsing
This commit is contained in:
parent
6e6c51a9ee
commit
064d6fd941
|
@ -72,12 +72,7 @@
|
||||||
protected static function clean_url (string $url)
|
protected static function clean_url (string $url)
|
||||||
{
|
{
|
||||||
$to_remove = parse_url(HTTP_PWD, PHP_URL_PATH);
|
$to_remove = parse_url(HTTP_PWD, PHP_URL_PATH);
|
||||||
if ($to_remove === null)
|
$url = mb_strcut($url, $to_remove ? mb_strlen($to_remove) : 0);
|
||||||
{
|
|
||||||
return $url;
|
|
||||||
}
|
|
||||||
|
|
||||||
$url = mb_strcut($url, mb_strlen($to_remove));
|
|
||||||
$url = parse_url($url, PHP_URL_PATH);
|
$url = parse_url($url, PHP_URL_PATH);
|
||||||
|
|
||||||
return $url;
|
return $url;
|
||||||
|
|
Loading…
Reference in New Issue