Stdlib: SimpleXMLElement::xpath() invalid expression → warning + false (#22720)#22765
Merged
Merged
Conversation
#22720) Match php-src zim_simplexmlelement_xpath / xmlXPathEval failure: Invalid expression E_WARNING and false (not empty array). Add user-script AOT lowering for compile-time trees + literal paths. Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks
Co-authored-by: Cursor <cursoragent@cursor.com>
Owner
Author
67 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
zim_simplexmlelement_xpath/xmlXPathEvalExpressionfailure: invalid XPath →E_WARNINGSimpleXMLElement::xpath(): Invalid expression+false(not[]).[].SimpleXMLElement::xpathproxy; compile-time tree + literal path lower via host SimpleXML (false / empty node-set).php-src:
ext/simplexml/simplexml.c(sxe_xpath)PHP impl:
ext/simplexml/VmSimpleXml.php,JitSimpleXmlUserScript::tryXpath,JitSimpleXmlXpathCloses #22720
Test plan
php bin/vm.php test/repro/issue_22720_simplexml_xpath_invalid.php→ warning +false/boolean; empty query →arrayphp bin/jit.php test/repro/issue_22720_simplexml_xpath_invalid.php(same)php bin/compile.php -o /tmp/sxe22720 test/repro/issue_22720_simplexml_xpath_invalid_aot.php && /tmp/sxe22720→ warning +false/boolean/array:0./script/phpunit.sh --filter 'xpath_invalid_expression|xpath_child_and_absolute|xpath_register_namespace|xpath_live'→ OK (8)php script/bootstrap-inventory.php --check→ OK 6505/6505php script/check-selfhost-spine-coverage-sync.php→ OKVerification transcript (Docker)
Made with Cursor