[GIT-PULLS] [php-src] PR #23498: [DOM] Fix getNamedItemNS() with empty URI not matching null namespace

[email protected] (iliaal)
Newsgroups php.git-pulls
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.