mirror of
https://github.com/nextcloud/server.git
synced 2026-06-19 13:39:40 -04:00
Merge pull request #49424 from nextcloud/backport/49373/stable29
[stable29] fix(SetupChecks): Make sure array key is set
This commit is contained in:
commit
f84a7a0cf4
1 changed files with 4 additions and 0 deletions
|
|
@ -110,6 +110,10 @@ trait CheckServerResponseTrait {
|
|||
protected function normalizeUrl(string $url, bool $removeWebroot): string {
|
||||
if ($removeWebroot) {
|
||||
$segments = parse_url($url);
|
||||
if (!isset($segments['scheme']) || !isset($segments['host'])) {
|
||||
throw new \InvalidArgumentException('URL is missing scheme or host');
|
||||
}
|
||||
|
||||
$port = isset($segments['port']) ? (':' . $segments['port']) : '';
|
||||
return $segments['scheme'] . '://' . $segments['host'] . $port;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue