From: zizka at seznam dot cz Operating system: Any PHP version: 5.2.6 PHP Bug Type: DOM XML related Bug description: Back-comp break: DOMDocument::saveXML() doesn't accept null anymore
Description: ------------ In PHP 5.2.5, DOMDocument::saveXML() accepted null as it's first argument, which has this documentation: Use this parameter to output only a specific node without XML declaration rather than the entire document. In PHP 5.2.6, passing null causes error. Reproduce code: --------------- // $doc is a DOM document object. return $doc->saveXML(null, LIBXML_NOEMPTYTAG); Expected result: ---------------- IMHO null is reasonable value, meaning that whole document should be saved. I suggest to fix this backward compatibility break. Actual result: -------------- Catchable fatal error: Argument 1 passed to DOMDocument::saveXML() must be an instance of DOMNode, null given, called in ...\index.php on line 97 and defined in ...\inc.Menu.php on line 23 -- Edit bug report at http://bugs.php.net/?id=46191&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46191&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46191&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46191&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46191&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46191&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46191&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46191&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46191&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46191&r=support Expected behavior: http://bugs.php.net/fix.php?id=46191&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46191&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46191&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46191&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46191&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46191&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46191&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46191&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46191&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46191&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46191&r=mysqlcfg