[GIT-PULLS] [php-src] PR #23253: Fix DOMXPath crash wrapping a foreign node after a nodeset callback
[email protected] (iliaal)
| Newsgroups | php.git-pulls |
|---|---|
| Message-ID | <bDYnG3CDbB4H4wSIyh32stfClueAMAIO30w1ClLidh0@main.internal.php.net> |
Pull Request: https://github.com/php/php-src/pull/23253 Author: iliaal xpath_callbacks.node_list stores both DOM objects and arrays (nodeset-mode php:function args). dom_xpath_intern_for_doc did Z_DOMOBJ_P on every entry. Same-document results take the early return; a later callback that returns a node from another document walks leftover arrays first. This skips non-objects and recurses into arrays. PHP-8.5 is the lowest branch with intern_for_doc.