php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32114 DOM crashing when attribute appended to Document
Submitted: 2005-02-25 21:41 UTC Modified: 2005-02-25 23:24 UTC
From: miroslav dot sulc at startnet dot cz Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4.3.10 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: miroslav dot sulc at startnet dot cz
New email:
PHP Version: OS:

 

 [2005-02-25 21:41 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-25 21:43 UTC] miroslav dot sulc at startnet dot cz
Corrected summary
 [2005-02-25 23:24 UTC] 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.

Attributes can only appended to Element nodes. Now issues warning when attempting this operation. Changed summary as well.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 18:02:40 2024 UTC