Edit report at https://bugs.php.net/bug.php?id=66084&edit=1
ID: 66084
Updated by: cmb@php.net
Reported by: php at kenman dot net
Summary: simplexml_load_string() mangles empty node name
-Status: Closed
+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:
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.
Previous Comments:
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
[2014-04-05 08:35:32] ab@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