Skip to content

Commit dcb063d

Browse files
authored
Merge pull request #88 from simplesamlphp/tvdijen-patch-1
Fix use of incorrect property
2 parents 509ec04 + 4053cea commit dcb063d

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
@@ -124,13 +124,11 @@ private static function registerAncestorNamespaces(DOMXPath $xp, DOMNode $node):
124124
if ($attr->namespaceURI !== C_XML::NS_XMLNS) {
125125
continue;
126126
}
127-
$prefix = $attr->localName;
127+
$prefix = $attr->prefix;
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)