[php-src] PR #23253: Fix DOMXPath crash wrapping a foreign node after a nodeset callback
| From: | iliaal | Date: | Thu, 13 Aug 2026 15:47:17 +0000 |
| Subject: | [php-src] PR #23253: Fix DOMXPath crash wrapping a foreign node after a nodeset callback | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-37827@lists.php.net to get a copy of this message | ||
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.