From: vesko at webstudiobulgaria dot com Operating system: Debian testing PHP version: 5.2.5 PHP Bug Type: SimpleXML related Bug description: Unconsistent behaviour when assigning new nodes
Description: ------------ There is a difference in the way the html entities are handled when the new nodes are assigned in different ways. In case of using addChild method they are decoded, otherwise not. Reproduce code: --------------- $xml_element = new simpleXMLElement('<root></root>'); $xml_element->node1 = 'a & b'; $xml_element->addChild('node2','c & d'); print $xml_element->node1; print $xml_element->node2; Expected result: ---------------- a & bc & d//both left or a & bc & d//both decoded Actual result: -------------- a & bc & d//one left and the other decoded -- Edit bug report at http://bugs.php.net/?id=44478&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44478&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44478&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44478&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44478&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44478&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44478&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44478&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44478&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44478&r=support Expected behavior: http://bugs.php.net/fix.php?id=44478&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44478&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44478&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44478&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44478&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44478&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44478&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44478&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44478&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44478&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44478&r=mysqlcfg