#29213 [Opn->Bgs]: incorrect interpretation of Postgre boolean variables
| From: | iliaa@php.net | Date: | Sun, 18 Jul 2004 16:48:39 +0000 |
| Subject: | #29213 [Opn->Bgs]: incorrect interpretation of Postgre boolean variables | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-62590@lists.php.net to get a copy of this message | ||
ID: 29213
Updated by: iliaa@php.net
Reported By: ataols at latnet dot lv
-Status: Open
+Status: Bogus
Bug Type: PostgreSQL related
Operating System: Gentoo Linux
PHP Version: 4.3.7
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
All data is fetched in the form of strings.
Previous Comments:
------------------------------------------------------------------------
[2004-07-16 16:12:06] ataols at latnet dot lv
Description:
------------
The PHP functions pg_fetch_... incorrectly interprets boolean variables
from PostgreSQL databases: instead of setting a boolean PHP variable
they set one-character PHP strings with values "f" or "t". Both of them
are interpreted as TRUE by PHP.
Reproduce code:
---------------
echo $dbvars['boolvar'].", is_bool:
".is_bool($dbvars['boolvar']).",
is_string: ".is_string($dbvars['boolvar'])."<BR>\n";
Expected result:
----------------
, is_bool: 1, is_string:
Actual result:
--------------
f, is_bool: , is_string: 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29213&edit=1