Skip to content

Commit 5a09cb1

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: [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 [Mailer] Fix SES API call with UTF-8 Addresses
2 parents b4a437d + 8d52012 commit 5a09cb1

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)