diff --git a/src/ApiDefinition.php b/src/ApiDefinition.php index a9e3c8f..72dfbc8 100644 --- a/src/ApiDefinition.php +++ b/src/ApiDefinition.php @@ -810,7 +810,7 @@ private function getMethodsAsArray(array $resources) private function setProtocolsFromBaseUri(): void { - $schema = \mb_strtoupper(\parse_url($this->baseUri, PHP_URL_SCHEME)); + $schema = \mb_strtoupper(\parse_url($this->baseUri, PHP_URL_SCHEME) ?? ''); $this->protocols = empty($schema) ? [self::PROTOCOL_HTTPS, self::PROTOCOL_HTTP] : [$schema]; }