ID:               32114
 Updated by:       [EMAIL PROTECTED]
-Summary:          DOMDocument->dump_mem() crashes when encoding
                   attribute already set
 Reported By:      miroslav dot sulc at startnet dot cz
-Status:           Open
+Status:           Closed
 Bug Type:         DOM XML related
 Operating System: linux
 PHP Version:      4.3.10
 New Comment:

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.

Attributes can only appended to Element nodes. Now issues warning when
attempting this operation. Changed summary as well.


Previous Comments:
------------------------------------------------------------------------

[2005-02-25 21:43:48] miroslav dot sulc at startnet dot cz

Corrected summary

------------------------------------------------------------------------

[2005-02-25 21:41:06] miroslav dot sulc at startnet dot cz

Description:
------------
When dumping DOM XML document using
$string = $doc->dump_mem(true, 'UTF-8')
on document where encoding is already set using, the PHP crashes.

Reproduce code:
---------------
$doc = domxml_new_doc('1.0');
$attribute = $doc->create_attribute('encoding', 'UTF-8');
$doc->append_child($attribute);
// This line makes the PHP crash
$string = $doc->dump_mem(true, 'UTF-8');


Expected result:
----------------
It shouldn't crash. It just may issue a warning.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32114&edit=1

Reply via email to