Skip to content

Commit

Permalink
fix: Fix deprecation notices found from GHA workflow run
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyvdSluijs committed Aug 2, 2024
1 parent 6448d43 commit ac94ea5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/JsonSchema/Uri/UriRetriever.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function confirmMediaType($uriRetriever, $uri)
}

foreach ($this->allowedInvalidContentTypeEndpoints as $endpoint) {
if (strpos($uri, $endpoint) === 0) {
if (!\is_null($uri) && strpos($uri, $endpoint) === 0) {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Uri/UriRetrieverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public function testPackageURITranslation()
$root = sprintf('file://%s/', realpath(__DIR__ . '/../..'));

$uri = $retriever->translate('package://foo/bar.json');
$this->assertEquals("${root}foo/bar.json", $uri);
$this->assertEquals("{$root}foo/bar.json", $uri);
}

public function testDefaultDistTranslations()
Expand Down

0 comments on commit ac94ea5

Please sign in to comment.