Skip to content

Commit 8d52012

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [Finder] Fix gitignore regex build with "**" Fixed deprecation warnings about passing null as parameter [Security] Keep Bulgarian wording consistent across all texts. Migrate configuration file for PHP CS Fixer 2.19/3.0 [Form] Replace broken ServerParams mock
2 parents 400e265 + fc0bd1f commit 8d52012

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)