#43095 [Opn->Csd]: DOMDocument::loadXML raises an undocumented warning when passed an empty string
| From: | rquadling@php.net | Date: | Thu, 25 Oct 2007 09:02:02 +0000 |
| Subject: | #43095 [Opn->Csd]: DOMDocument::loadXML raises an undocumented warning when passed an empty string | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-176@lists.php.net to get a copy of this message | ||
ID: 43095
Updated by: rquadling@php.net
Reported By: mike at silverorange dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2007-10-25 09:00:31] rquadling@php.net
load(), loadXML(), loadHTML(), loadHTMLFile() all exhibit this
behaviour - empty string for loadXML() and loadHTML() and empty file
for load() and loadHTMLFile().
------------------------------------------------------------------------
[2007-10-24 16:00:34] mike at silverorange dot com
Description:
------------
DOMDocument::loadXML and DOMDocument::load raise undocumented PHP
warnings when passed an empty string as the argument.
Reproduce code:
---------------
$document = new DOMDocument();
$document->loadXML('');
Expected result:
----------------
Since this is by design (see Bug #43809), the documentation should be
updated to say what happens when you pass an empty string.
Something like:
"If an empty string is passed as the $source, a PHP warning will be
generated. This warning is not generated by libxml and cannot be handled
using libxml's error handling functions."
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43095&edit=1