Skip to content

Commit 4053cea

Browse files
authored
Prefix cannot be null
1 parent 2c5f242 commit 4053cea

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/XPath/XPath.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ private static function registerAncestorNamespaces(DOMXPath $xp, DOMNode $node):
128128
$uri = (string) $attr->nodeValue;
129129

130130
if (
131-
$prefix === null || $prefix === '' ||
132-
$prefix === 'xmlns' || $uri === '' ||
133-
isset($prefixToUri[$prefix])
131+
$prefix === '' || $prefix === 'xmlns' || $uri === '' || isset($prefixToUri[$prefix])
134132
) {
135133
continue;
136134
}

0 commit comments

Comments
 (0)