#32114 [Opn]: DOMDocument->dump_mem() crashes when encoding attribute already set
| From: | miroslav dot sulc at startnet dot cz | Date: | Fri, 25 Feb 2005 20:43:49 +0000 |
| Subject: | #32114 [Opn]: DOMDocument->dump_mem() crashes when encoding attribute already set | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-77395@lists.php.net to get a copy of this message | ||
ID: 32114
User updated by: miroslav dot sulc at startnet dot cz
-Summary: DOMDocument->dump_mem() cashes when encoding attribute
already set
Reported By: miroslav dot sulc at startnet dot cz
Status: Open
Bug Type: DOM XML related
Operating System: linux
PHP Version: 4.3.10
New Comment:
Corrected summary
Previous Comments:
------------------------------------------------------------------------
[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