Bug #67909 [Opn->Dup]: simplexml_load_string() mangles empty node name for specific xml structure
| From: | cmb@php.net | Date: | Wed, 30 Nov 2016 18:54:45 +0000 |
| Subject: | Bug #67909 [Opn->Dup]: simplexml_load_string() mangles empty node name for specific xml structure | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-205700@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67909&edit=1
ID: 67909
Updated by: cmb@php.net
Reported by: evgeniy dot arsenyev at gmail dot com
Summary: simplexml_load_string() mangles empty node name for
specific xml structure
-Status: Open
+Status: Duplicate
Type: Bug
Package: SimpleXML related
Operating System: CENTOS 7
PHP Version: 5.5.16
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This appears to be a duplicate of bug #66084, which has been fixed as of PHP 5.5.27 and 5.6.11, see
<https://3v4l.org/6E90U>.
Previous Comments:
------------------------------------------------------------------------
[2014-08-26 15:24:31] evgeniy dot arsenyev at gmail dot com
Description:
------------
This bug is pretty similar to Bug #66084 :
simplexml_load_string() incorrectly interprets some XML strings. For specific inputs with empty
nodes, node names are converted to integers.
Original bug was fixed, but the same bug appears on a slightly different XML string
'<a><c><inner/></c><c><inner>ddd</inner></c></a>'.
Test script:
---------------
print_r(simplexml_load_string('<a><c><inner/></c><c><inner>ddd</inner></c></a>'));
Expected result:
----------------
SimpleXMLElement Object
(
[c] => Array
(
[0] => SimpleXMLElement Object
(
[inner] => SimpleXMLElement Object
(
)
)
[1] => SimpleXMLElement Object
(
[inner] => dd
)
)
)
Actual result:
--------------
SimpleXMLElement Object
(
[c] => Array
(
[0] => SimpleXMLElement Object
(
[0] => SimpleXMLElement Object
(
)
)
[1] => SimpleXMLElement Object
(
[inner] => ddd
)
)
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67909&edit=1