Skip to content

Commit fc0bd1f

Browse files
committed
Fixed deprecation warnings about passing null as parameter
1 parent be13355 commit fc0bd1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AbstractUriElement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct(\DOMElement $node, string $currentUri = null, ?strin
4747
$this->currentUri = $currentUri;
4848

4949
$elementUriIsRelative = null === parse_url(trim($this->getRawUri()), \PHP_URL_SCHEME);
50-
$baseUriIsAbsolute = \in_array(strtolower(substr($this->currentUri, 0, 4)), ['http', 'file']);
50+
$baseUriIsAbsolute = null !== $this->currentUri && \in_array(strtolower(substr($this->currentUri, 0, 4)), ['http', 'file']);
5151
if ($elementUriIsRelative && !$baseUriIsAbsolute) {
5252
throw new \InvalidArgumentException(sprintf('The URL of the element is relative, so you must define its base URI passing an absolute URL to the constructor of the "%s" class ("%s" was passed).', __CLASS__, $this->currentUri));
5353
}

0 commit comments

Comments
 (0)