parse_url does not return port as array, but it is used as array in Request.php

So I added a check, wether this is an array actually, else I use the port as intended as int. I would assume, that that array check is needless altogether but maybe old PHP versions needed that?
This commit is contained in:
Grischa Brockhaus
2021-06-02 13:41:15 +02:00
parent 14aa9aa691
commit 655607d739

View File

@@ -555,7 +555,7 @@ class Request
$query = '?' . http_build_query(self::getArrayFromQuerystring($query)); $query = '?' . http_build_query(self::getArrayFromQuerystring($query));
} }
if ($port && $port[0] !== ':') { if ($port && (!is_array($port) || $port[0] !== ':')) {
$port = ':' . $port; $port = ':' . $port;
} }