From: programatorfreez at gmail dot com Operating system: Gentoo GNU/Linux PHP version: 5.2.5 PHP Bug Type: DOM XML related Bug description: Dom->importNode() returns FALSE instead of the Exception
Description: ------------ There is a DomException in the documentation of Dom->importNode(), but it returns FALSE on fail without a reason. Reproduce code: --------------- /** * Import node to dom * * @param DomElement node which will be imported * @param boolean deep (use recursive importing - default TRUE) * @return DomElement reference to created node */ public function domImportNode($node, $deep = TRUE) { if (FALSE === ($sxe = $this->dom->importNode($node, $deep))) { throw new Exception('importNode failed.'); } $sxe = $this->dom->appendChild($sxe); return $sxe; } Expected result: ---------------- DomException Actual result: -------------- My Exception -- Edit bug report at http://bugs.php.net/?id=43685&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43685&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43685&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43685&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43685&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43685&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43685&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43685&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43685&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43685&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43685&r=support Expected behavior: http://bugs.php.net/fix.php?id=43685&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43685&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43685&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43685&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43685&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43685&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43685&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43685&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43685&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43685&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43685&r=mysqlcfg