Bug #44478 [Com]: Unconsistent behaviour when assigning new nodes
Edit report at https://bugs.php.net/bug.php?id=44478&edit=1
ID: 44478
Comment by: quamis at gmail dot com
Reported by: vesko at webstudiobulgaria dot com
Summary: Unconsistent behaviour when assigning new nodes
Status: Closed
Type: Bug
Package: SimpleXML related
Operating System: Debian testing
PHP Version: 5.2.5
Block user comment: N
Private report: N
New Comment:
This problem is still present in PHP 5.3.6-13ubuntu3.2 with Suhosin-Patch
Previous Comments:
------------------------------------------------------------------------
[2008-03-20 16:53:43] rrichards@php.net
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
While the direct assignment problem was a bug, the addChild() case works
as expected. It allows fine grained control over adding content in
SimpleXML, including setting pre-escaped data.
------------------------------------------------------------------------
[2008-03-20 12:40:20] vesko at webstudiobulgaria dot com
It is fixed now.
I hope the patch will be included in the upcoming 5.2.6 :)
------------------------------------------------------------------------
[2008-03-20 11:54:32] felipe@php.net
Oh, really. I've updated the patch. :)
------------------------------------------------------------------------
[2008-03-20 09:15:40] vesko at webstudiobulgaria dot com
Hi Felipe,
Thanks for the patch.
I've tested it against 5.2.5 source. It fixes the case:
$xml_element->addChild('node2','c & d');
but not the case:
$xml_element->node1[0] = 'a & b';//still decodes
------------------------------------------------------------------------
[2008-03-20 00:22:06] felipe@php.net
Simple patch:
http://felipe.ath.cx/diff/bug44478.diff
------------------------------------------------------------------------
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=44478
--
Edit this bug report at https://bugs.php.net/bug.php?id=44478&edit=1
Thread (9 messages)