From: mike at silverorange dot com Operating system: PHP version: 5.2.4 PHP Bug Type: DOM XML related Bug description: DOMDocument::loadXML() causes warning not trapped by libxml errors
Description: ------------ When libxml_use_internal_errors() is used, DOMDocument::loadXML() still causes a general PHP warning to be raised when passed an empty string. If this is by design, the documentation should mention this warning will be triggered if an empty string is used. Reproduce code: --------------- $errors = libxml_use_internal_errors(true); $document = new DOMDocument(); var_dump($document->loadXML('')); libxml_clear_errors(); libxml_use_internal_errors($errors); Expected result: ---------------- bool(false) Actual result: -------------- Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: Empty string supplied as input bool(false) -- Edit bug report at http://bugs.php.net/?id=43089&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43089&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43089&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43089&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43089&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43089&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43089&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43089&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43089&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43089&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43089&r=support Expected behavior: http://bugs.php.net/fix.php?id=43089&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43089&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43089&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43089&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43089&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43089&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43089&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43089&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43089&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43089&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43089&r=mysqlcfg