mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-21 00:46:27 +02:00
Fix url parsing
This commit is contained in:
parent
6e6c51a9ee
commit
064d6fd941
2 changed files with 2 additions and 7 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
v3.9.0
|
v3.9.1
|
||||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue