Skip to content

Commit 9b456c5

Browse files
committed
Merge branch 'master' into feature/dom-migration-php84
2 parents fa41bf1 + dcb063d commit 9b456c5

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/XPath/XPath.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,11 @@ private static function registerAncestorNamespaces(Dom\XPath $xp, Dom\Node $node
121121
if ($attr->namespaceURI !== C_XML::NS_XMLNS) {
122122
continue;
123123
}
124-
$prefix = $attr->localName;
124+
$prefix = $attr->prefix;
125125
$uri = (string) $attr->nodeValue;
126126

127127
if (
128-
$prefix === null || $prefix === '' ||
129-
$prefix === 'xmlns' || $uri === '' ||
130-
isset($prefixToUri[$prefix])
128+
$prefix === '' || $prefix === 'xmlns' || $uri === '' || isset($prefixToUri[$prefix])
131129
) {
132130
continue;
133131
}

0 commit comments

Comments
 (0)