Skip to content

Commit

Permalink
Merge pull request #49373 from nextcloud/backportArrayKeySetupCheks
Browse files Browse the repository at this point in the history
fix(SetupChecks): Make sure array key is set
  • Loading branch information
solracsf authored Nov 21, 2024
2 parents 2ebcfad + 50d071e commit 09ad395
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 @@ -93,6 +93,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 09ad395

Please sign in to comment.