From: breakpoint at gazeta dot pl Operating system: Linux Slackware 10 PHP version: 5.0.3 PHP Bug Type: DOM XML related Bug description: createElement('param') dosn't add </param> tag
Description: ------------ DOM in PHP5 eating ( ;-) ) close tag when I add tag <param>. I expected <param ..></param> or <param/>. but DOM get <param> with out </param> :-( Sorry for my english - look in Reproduce code, and Expected and Actual results. Reproduce code: --------------- <?php $objDOM = new DOMDocument(); $objConfig = $objDOM->createElement('config'); $objDOM->appendChild($objConfig); $objSettings = $objDOM->createElement('settings'); $objConfig->appendChild($objSettings); for($i=0; $i<10; $i++) { $objParam = $objDOM->createElement('param'); //HERE!! $objParam->SetAttribute('name', '11'); $objParam->SetAttribute('value', '22'); $objConfig->appendChild($objParam); } echo htmlspecialchars($objDOM->saveHTML()); ?> Expected result: ---------------- <config><settings></settings><param name="11" value="22"></param><param name="11" value="22"></param><param name="11" value="22"></param><param name="11" value="22"></param><param name="11" value="22"></param><param name="11" value="22"></param><param name="11" value="22"></param><param name="11" value="22"></param><param name="11" value="22"></param><param name="11" value="22"></param></config> Actual result: -------------- <config><settings></settings><param name="11" value="22"> <param name="11" value="22"> <param name="11" value="22"> <param name="11" value="22"> <param name="11" value="22"> <param name="11" value="22"> <param name="11" value="22"> <param name="11" value="22"> <param name="11" value="22"> <param name="11" value="22"></config> -- Edit bug report at http://bugs.php.net/?id=33261&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33261&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33261&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33261&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33261&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33261&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33261&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33261&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33261&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33261&r=support Expected behavior: http://bugs.php.net/fix.php?id=33261&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33261&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33261&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33261&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33261&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33261&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33261&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33261&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33261&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33261&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33261&r=mysqlcfg