mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 08:16:43 -04:00
Merge pull request #49373 from nextcloud/backportArrayKeySetupCheks
fix(SetupChecks): Make sure array key is set
This commit is contained in:
commit
09ad3951e3
1 changed files with 4 additions and 0 deletions
|
|
@ -93,6 +93,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