1
0
mirror of https://github.com/flarum/core.git synced 2025-07-24 18:21:33 +02:00

Fix installer removing URL port (#2182)

* Fix installer removing URL port
This commit is contained in:
Matt Kilgore
2020-05-25 08:35:22 -04:00
committed by GitHub
parent 63397bb466
commit 26256c436f

View File

@@ -71,8 +71,10 @@ final class BaseUrl
$path = substr($parseUrl['path'], 0, strrpos($parseUrl['path'], '/'));
}
$port = isset($parseUrl['port']) ? ':'.$parseUrl['port'] : '';
return rtrim(
sprintf('%s://%s%s', $parseUrl['scheme'], $parseUrl['host'], $path),
sprintf('%s://%s%s%s', $parseUrl['scheme'], $parseUrl['host'], $port, $path),
'/'
);
}