#24692 [NEW]: MDB_pgsql::convertResult bug
| From: | koyama at hoge dot org | Date: | Thu, 17 Jul 2003 16:02:45 +0000 |
| Subject: | #24692 [NEW]: MDB_pgsql::convertResult bug | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-18344@lists.php.net to get a copy of this message | ||
From: koyama at hoge dot org
Operating system: FreeBSD
PHP version: 4.3.2
PHP Bug Type: PEAR related
Bug description: MDB_pgsql::convertResult bug
Description:
------------
MDB has auto type conversion. It doesn't work on pgsql with type
'boolean'. Patch followed:
--- pgsql.php.orig Fri Jul 18 00:51:40 2003
+++ pgsql.php Fri Jul 18 00:54:38 2003
@@ -749,7 +749,7 @@
{
switch ($type) {
case MDB_TYPE_BOOLEAN:
- return(strcmp($value, 'Y') ? 0 : 1);
+ return(strcmp($value, 't') ? false : true);
case MDB_TYPE_DECIMAL:
return(sprintf('%.'.$this->decimal_places.'f',doubleval($value)/$this->decimal_factor));
case MDB_TYPE_FLOAT:
--
Edit bug report at http://bugs.php.net/?id=24692&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24692&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24692&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=24692&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24692&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24692&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24692&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24692&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24692&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24692&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24692&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24692&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24692&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24692&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24692&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24692&r=gnused