[php-src] PR #23498: [DOM] Fix getNamedItemNS() with empty URI not matching null namespace
| From: | iliaal | Date: | Sat, 29 Aug 2026 12:02:12 +0000 |
| Subject: | [php-src] PR #23498: [DOM] Fix getNamedItemNS() with empty URI not matching null namespace | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38192@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23498
Author: iliaal
Dom\NamedNodeMap::getNamedItemNS() passed an empty-string URI straight to xmlHasNsProp(), which
matches NULL-namespace attributes only when the URI pointer is NULL, so getNamedItemNS("",
"bar") returned NULL even though hasAttributeNS("", "bar") found the
attribute in spec-following mode. An empty URI now normalizes to NULL at the namednodemap entry
point when a base object is present, the same conversion dom_get_attribute_ns() applies in
element.c. A sibling audit of xmlHasNsProp() and xmlGetNsProp() call sites found no other path
passing a user-supplied URI.