Skip to content

Commit ac94ea5

Browse files
committed
1 parent 6448d43 commit ac94ea5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/JsonSchema/Uri/UriRetriever.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function confirmMediaType($uriRetriever, $uri)
8484
}
8585

8686
foreach ($this->allowedInvalidContentTypeEndpoints as $endpoint) {
87-
if (strpos($uri, $endpoint) === 0) {
87+
if (!\is_null($uri) && strpos($uri, $endpoint) === 0) {
8888
return true;
8989
}
9090
}

tests/Uri/UriRetrieverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public function testPackageURITranslation()
300300
$root = sprintf('file://%s/', realpath(__DIR__ . '/../..'));
301301

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

306306
public function testDefaultDistTranslations()

0 commit comments

Comments
 (0)