#43095 [Opn]: DOMDocument::loadXML raises an undocumented warning when passed an empty string

From: Date: Thu, 25 Oct 2007 09:00:32 +0000
Subject: #43095 [Opn]: 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-175@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 Bug Type: Documentation problem PHP Version: Irrelevant New Comment: load(), loadXML(), loadHTML(), loadHTMLFile() all exhibit this behaviour - empty string for loadXML() and loadHTML() and empty file for load() and loadHTMLFile(). Previous Comments: ------------------------------------------------------------------------ [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

« previous php.doc.bugs (#175) next »