Bug #66084 [PATCH]: simplexml_load_string() mangles empty node name

From: Date: Tue, 26 May 2015 14:27:20 +0000
Subject: Bug #66084 [PATCH]: simplexml_load_string() mangles empty node name
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192892@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66084&edit=1 ID: 66084 Patch added by: cmb@php.net Reported by: php at kenman dot net Summary: simplexml_load_string() mangles empty node name Status: Re-Opened Type: Bug Package: SimpleXML related Operating System: Win7 PHP Version: 5.5Git-2013-11-12 (snap) Assigned To: ab Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: sxe-var-dump Revision: 1432650439 URL: https://bugs.php.net/patch-display.php?bug=66084&patch=sxe-var-dump&revision=1432650439 Previous Comments: ------------------------------------------------------------------------ [2015-05-26 14:26:36] cmb@php.net Re-opened because of evgeniy's comment. This bug seems to be closely related to bug #62639. Adding the check for !node->next in the commit apparently only solves some issues. It seems to me that instead it has to be checked for sxe->iter.type, because when this is SXE_ITER_NONE it doesn't make sense to execute the else clause. With the attached patch sxe-var-dump.patch all ext/simplexml/tests run fine, as well as the test script of bug #69491. Anantol, can you please have a look at the issue. If useful, I can make a pull request with some further tests regarding whitespace issues. ------------------------------------------------------------------------ [2014-10-07 23:26:47] stas@php.net Automatic comment on behalf of ab Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=a0beddf5e9ab3c6feaf0921be72a7f430597abea Log: Fixed bug #66084 simplexml_load_string() mangles empty node name ------------------------------------------------------------------------ [2014-10-07 23:15:40] stas@php.net Automatic comment on behalf of ab Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=a0beddf5e9ab3c6feaf0921be72a7f430597abea Log: Fixed bug #66084 simplexml_load_string() mangles empty node name ------------------------------------------------------------------------ [2014-08-19 14:46:41] evgeniy dot arsenyev at gmail dot com The issue is still actual for a specific xml: print_r(simplexml_load_string('<a><c><inner/></c><c><inner>ddd</inner></c></a>')); PHP 5.5.15 (CentOS 7) returns: SimpleXMLElement Object ( [c] => Array ( [0] => SimpleXMLElement Object ( [0] => SimpleXMLElement Object ( ) ) [1] => SimpleXMLElement Object ( [inner] => ddd ) ) ) but it should return (PHP 5.3.10, Ubuntu 12.10): SimpleXMLElement Object ( [c] => Array ( [0] => SimpleXMLElement Object ( [inner] => SimpleXMLElement Object ( ) ) [1] => SimpleXMLElement Object ( [inner] => dd ) ) ) ------------------------------------------------------------------------ [2014-04-10 04:47:29] tyrael@php.net Automatic comment on behalf of ab Revision: http://git.php.net/?p=php-src.git;a=commit;h=a0beddf5e9ab3c6feaf0921be72a7f430597abea Log: Fixed bug #66084 simplexml_load_string() mangles empty node name ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=66084 -- Edit this bug report at https://bugs.php.net/bug.php?id=66084&edit=1

« previous php.bugs (#192892) next »