#35151 [Opn->Bgs]: True/false bug
| From: | tony2001@php.net | Date: | Tue, 08 Nov 2005 11:10:05 +0000 |
| Subject: | #35151 [Opn->Bgs]: True/false bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-87842@lists.php.net to get a copy of this message | ||
ID: 35151
Updated by: tony2001@php.net
Reported By: antido at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Windows XP
PHP Version: 5.0.5
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2005-11-08 12:09:17] antido at gmail dot com
Description:
------------
I encountered this bug while reading out a CSV file.
The problem here is the fact that PHP cannot parse True/False as a
string in this situation.
In the CSV file, rows are built like this:
"True";"26631";"2";"6";"20040521";"2004";"null"
When I loop through the rows, and echo the first value ($data[0]) it
says "True" or "False", but when I try to use it in an if-statement, it
will always go to the else section.
Reproduce code:
---------------
function convertBoolean($tring)
{
if($tring == 0)
{
$return = "1";
}
else
{
$return = "0";
}
return $return;
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35151&edit=1