Bug #54998 [Fbk->NoF]: DOMElement::setAttribute fails if the value is : "0"
Edit report at https://bugs.php.net/bug.php?id=54998&edit=1
ID: 54998
Updated by: php-bugs@lists.php.net
Reported by: ealexs at gmail dot com
Summary: DOMElement::setAttribute fails if the value is : "0"
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: DOM XML related
Operating System: Debian squeeze1
PHP Version: 5.3.6
Assigned To: rrichards
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2011-06-07 10:15:24] bjori@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
No it doesn't:
bjori@foobar:~$ php -derror_reporting=-1
<?php
$doc = new DOMDocument("1.0");
$node = $doc->createElement("para");
$newnode = $doc->appendChild($node);
$n = $newnode->setAttribute("align", 0);
$x = $newnode->setAttribute("align2", "0");
var_dump($n, $x);
print $doc->saveXML();
object(DOMAttr)#3 (0) {
}
object(DOMAttr)#4 (0) {
}
<?xml version="1.0"?>
<para align="0" align2="0"/>
bjori@foobar:~$
------------------------------------------------------------------------
[2011-06-06 10:01:17] ealexs at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/domelement.setattribute#Description
---
DOMElement::setAttribute fails if the value is : "0" (or 0 as numeric)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=54998&edit=1
Thread (4 messages)