#32114 [NEW]: DOMDocument->dump_mem() cashes when encoding attribute already set

From: Date: Fri, 25 Feb 2005 20:41:07 +0000
Subject: #32114 [NEW]: DOMDocument->dump_mem() cashes when encoding attribute already set
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76778@lists.php.net to get a copy of this message
From: miroslav dot sulc at startnet dot cz Operating system: linux PHP version: 4.3.10 PHP Bug Type: DOM XML related Bug description: DOMDocument->dump_mem() cashes when encoding attribute already set 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 bug report at http://bugs.php.net/?id=32114&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32114&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32114&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32114&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32114&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32114&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32114&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32114&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32114&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32114&r=support Expected behavior: http://bugs.php.net/fix.php?id=32114&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32114&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32114&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32114&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32114&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32114&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32114&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32114&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32114&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32114&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32114&r=mysqlcfg

« previous php.bugs (#76778) next »