#30572 [Opn->Csd]: Testing attribute="true" as boolean crashed php cli
| From: | iliaa@php.net | Date: | Tue, 26 Oct 2004 22:47:23 +0000 |
| Subject: | #30572 [Opn->Csd]: Testing attribute="true" as boolean crashed php cli | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-68370@lists.php.net to get a copy of this message | ||
ID: 30572
Updated by: iliaa@php.net
Reported By: adam dot stout at ncr dot com
-Status: Open
+Status: Closed
Bug Type: SimpleXML related
Operating System: WinXP
PHP Version: 5.0.1
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-10-26 22:52:07] adam dot stout at ncr dot com
Description:
------------
Then converting a text value of a boolean to an actual boolean PHP
crashes after doing the conversion. If you don't convert to boolean
and compare text to text it is fine.
Reproduce code:
---------------
<?
$XML = simplexml_load_file("test.xml");
if($XML['boolean'] == "true") {echo "Attribute is the text true\n";}
if($XML['boolean'] == true) {echo "Attribute is the boolean true\n";}
?>
XML file contents (1 line):
<test boolean="true"/>
Expected result:
----------------
Attribute is the text true
Attribute is the boolean true
Actual result:
--------------
Attribute is the text true
Attribute is the boolean true
But PHP crashed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30572&edit=1