com php-src: recovered original meaning of SXE xpath test: ext/simplexml/tests/SimpleXMLElement_xpath.phpt

From: Date: Sun, 31 May 2015 19:27:02 +0000
Subject: com php-src: recovered original meaning of SXE xpath test: ext/simplexml/tests/SimpleXMLElement_xpath.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87020@lists.php.net to get a copy of this message
Commit: e44b040faf0bf41eaf1b7ff975b460d10fc1b401 Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 30 May 2015 18:09:51 +0200 Committer: Anatol Belski <ab@php.net> Sun, 31 May 2015 21:27:02 +0200 Parents: 1e9522021ab147d7986fbd93dcd3eafae2b24620 Branches: PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e44b040faf0bf41eaf1b7ff975b460d10fc1b401 Log: recovered original meaning of SXE xpath test Changed paths: M ext/simplexml/tests/SimpleXMLElement_xpath.phpt Diff: diff --git a/ext/simplexml/tests/SimpleXMLElement_xpath.phpt b/ext/simplexml/tests/SimpleXMLElement_xpath.phpt index 4a613c2..fb7e6e9 100644 --- a/ext/simplexml/tests/SimpleXMLElement_xpath.phpt +++ b/ext/simplexml/tests/SimpleXMLElement_xpath.phpt @@ -2,7 +2,14 @@ Testing xpath() with invalid XML --FILE-- <?php -$xml = @simplexml_load_string("XXXXXXX^",$x,0x6000000000000001); +// gracefully recover from parsing of invalid XML; not available in PHP +const XML_PARSE_RECOVER = 1; + +// we're not interested in checking concrete warnings regarding invalid XML +$xml = @simplexml_load_string("XXXXXXX^", 'SimpleXMLElement', XML_PARSE_RECOVER); + +// $xml is supposed to hold a SimpleXMLElement, but not FALSE/NULL var_dump($xml->xpath("BBBB")); +?> --EXPECT-- bool(false)

« previous php.cvs (#87020) next »