You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dom\HTMLDocument::querySelectorAll() returns duplicates for selector lists #25210
Dom\HTMLDocument::querySelectorAll() returns an element once per selector of a selector list it matches. The DOM standard says the result holds each element once, in tree order ("scope-match a selectors string" returns a set).
This is a duplicate of GH-24260, which was fixed in d1fdbba. That commit makes dom_parent_node_query_selector_all() pass LXB_SELECTORS_OPT_MATCH_FIRST instead of LXB_SELECTORS_OPT_DEFAULT, so lexbor stops after the first selector in the list that matches a node.
The fix is on PHP-8.4, PHP-8.5 and master, and it is in php-8.5.13RC1. PHP 8.5.12 predates it. Closing as a duplicate.
Activity
phcorp commentedon Nov 5, 2026
This is a duplicate of GH-24260, which was fixed in d1fdbba. That commit makes
dom_parent_node_query_selector_all()passLXB_SELECTORS_OPT_MATCH_FIRSTinstead ofLXB_SELECTORS_OPT_DEFAULT, so lexbor stops after the first selector in the list that matches a node.The fix is on PHP-8.4, PHP-8.5 and master, and it is in php-8.5.13RC1. PHP 8.5.12 predates it. Closing as a duplicate.