Proberly handle hostnames with ports in Pico::getBaseUrl()
(#472)
* fixed getting current port from current host Resolves #472
This commit is contained in:
parent
cbed65cfdf
commit
84949975b0
1 changed files with 1 additions and 1 deletions
|
@ -2054,8 +2054,8 @@ class Pico
|
|||
|
||||
$hostPortPosition = ($host[0] === '[') ? strpos($host, ':', strrpos($host, ']') ?: 0) : strrpos($host, ':');
|
||||
if ($hostPortPosition !== false) {
|
||||
$host = substr($host, 0, $hostPortPosition);
|
||||
$port = (int) substr($host, $hostPortPosition + 1);
|
||||
$host = substr($host, 0, $hostPortPosition);
|
||||
}
|
||||
|
||||
$protocol = 'http';
|
||||
|
|
Loading…
Reference in a new issue