Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

ApiDefinition: Fix Deprecated warning on empty schema#181

Open
adriendupuis wants to merge 1 commit intoraml-org:masterfrom
adriendupuis:patch-2
Open

ApiDefinition: Fix Deprecated warning on empty schema#181
adriendupuis wants to merge 1 commit intoraml-org:masterfrom
adriendupuis:patch-2

Conversation

@adriendupuis
Copy link

@adriendupuis adriendupuis commented Oct 17, 2023

According to line 815, empty schema is supported. This update avoids passing null when $this->baseUri doesn't have a scheme/schema from \parse_url($this->baseUri, PHP_URL_SCHEME) to mb_strtoupper.

To reproduce:

  • Don't set a baseUri in your RAML configuration ($this->baseUri is null).
  • Set a baseUri without schema, like baseUri: //api.example.com/{version}.

Fix PHP Deprecated: mb_strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/adriendupuis/www/developer-documentation/tools/raml2html/vendor/raml-org/raml-php-parser/src/ApiDefinition.php on line 813

According to line 815, empty schema is supported.

"PHP Deprecated:  mb_strtoupper(): Passing null to parameter raml-org#1 ($string) of type string is deprecated in /Users/adriendupuis/www/developer-documentation/tools/raml2html/vendor/raml-org/raml-php-parser/src/ApiDefinition.php on line 813"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant