From: ataols at latnet dot lv Operating system: Gentoo Linux PHP version: 4.3.7 PHP Bug Type: PostgreSQL related Bug description: incorrect interpretation of Postgre boolean variables
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 bug report at http://bugs.php.net/?id=29213&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29213&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29213&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29213&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29213&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29213&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29213&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29213&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29213&r=support Expected behavior: http://bugs.php.net/fix.php?id=29213&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29213&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29213&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29213&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29213&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29213&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29213&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29213&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29213&r=float