diff --git a/tools/raml2html/composer.json b/tools/raml2html/composer.json
index d39e716036..07e47581f2 100644
--- a/tools/raml2html/composer.json
+++ b/tools/raml2html/composer.json
@@ -42,7 +42,8 @@
"raml-org/raml-php-parser": {
"Array of scalars": "https://github.com/raml-org/raml-php-parser/commit/d2e58eac1705a8cf2be43ed3d482006e67e4ef2d.patch",
"No available type list in type not found exception": "https://github.com/raml-org/raml-php-parser/commit/d54af98b9bd6d2400bbdd1c186e9b86c2dd88c83.patch",
- "Fix warnings and depreciations for PHP 8.1": "https://patch-diff.githubusercontent.com/raw/raml-org/raml-php-parser/pull/180.patch"
+ "Fix warnings and depreciations for PHP 8.1": "https://patch-diff.githubusercontent.com/raw/raml-org/raml-php-parser/pull/180.patch",
+ "Fix baseUri misuse": "patches/ApiDefinition.php.patch"
}
}
}
diff --git a/tools/raml2html/patches/ApiDefinition.php.patch b/tools/raml2html/patches/ApiDefinition.php.patch
new file mode 100644
index 0000000000..7dfdbb8558
--- /dev/null
+++ b/tools/raml2html/patches/ApiDefinition.php.patch
@@ -0,0 +1,17 @@
+Index: tools/raml2html/vendor/raml-org/raml-php-parser/src/ApiDefinition.php
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/src/ApiDefinition.php b/src/ApiDefinition.php
+--- a/src/ApiDefinition.php
++++ b/src/ApiDefinition.php (date 1707386266597)
+@@ -810,7 +810,7 @@
+
+ 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];
+ }