Bug #52382 [Opn->Bgs]: NULL in method arguments is casted to string?
| From: | aharvey@php.net | Date: | Tue, 20 Jul 2010 07:59:02 +0000 |
| Subject: | Bug #52382 [Opn->Bgs]: NULL in method arguments is casted to string? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-152543@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52382&edit=1
ID: 52382
Updated by: aharvey@php.net
Reported by: giorgio dot liscio at email dot it
Summary: NULL in method arguments is casted to string?
-Status: Open
+Status: Bogus
Type: Bug
Package: DOM XML related
Operating System: all ? xp x64
PHP Version: 5.3.2
New Comment:
They're not equivalent: you're providing a value for the "value"
parameter to DOMDocument::createElement(), so yes, it will get coerced
into an empty string using PHP's usual type juggling mechanism.
Previous Comments:
------------------------------------------------------------------------
[2010-07-20 09:46:25] giorgio dot liscio at email dot it
Description:
------------
hi, test this:
header("Content-Type: text/plain");
$doc = new \DOMDocument()
$doc->appendChild($doc->createElement("root", NULL));
echo $doc->saveXML();
echo "\n\nshould be equivalent to:\n\n";
$doc = new \DOMDocument()
$doc->appendChild($doc->createElement("root"));
echo $doc->saveXML();
i hope other DOM methods will work good... otherwise fix is needed
thank you!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52382&edit=1