Skip to content

Commit

Permalink
fix: Add fallback to empty string when null value is passed in UriRes…
Browse files Browse the repository at this point in the history
…olver::parse
  • Loading branch information
DannyvdSluijs committed Aug 2, 2024
1 parent ac94ea5 commit 5224ee9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JsonSchema/Uri/UriResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class UriResolver implements UriResolverInterface
*/
public function parse($uri)
{
preg_match('|^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?|', $uri, $match);
preg_match('|^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?|', $uri ?: '', $match);

$components = array();
if (5 < count($match)) {
Expand Down

0 comments on commit 5224ee9

Please sign in to comment.