Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #32114 : DOM crashing when attribute appended to Do***ent
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 21st March 23:36
External User
 
Posts: 1
Default #32114 : DOM crashing when attribute appended to Do***ent



ID: 32114
Updated by: rrichards@php.net
-Summary: DOMDo***ent->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 do***ent using
$string = $doc->dump_mem(true, 'UTF-8')
on do***ent 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 With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666