Skip to content

Commit

Permalink
Merge pull request #49424 from nextcloud/backport/49373/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(SetupChecks): Make sure array key is set
  • Loading branch information
solracsf authored Nov 23, 2024
2 parents 46116d8 + 60d1ab2 commit f84a7a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/settings/lib/SetupChecks/CheckServerResponseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ protected function getTestUrls(string $url, bool $isRootRequest = false): array
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;
}
Expand Down

0 comments on commit f84a7a0

Please sign in to comment.