Bug #52134 [Opn->Csd]: pdo_dblib returns 40 char strings for int

From: Date: Tue, 22 Jun 2010 02:11:25 +0000
Subject: Bug #52134 [Opn->Csd]: pdo_dblib returns 40 char strings for int
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-151750@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52134&edit=1

 ID:               52134
 Updated by:       ssufficool@php.net
 Reported by:      ssufficool at gmail dot com
 Summary:          pdo_dblib returns 40 char strings for int
-Status:           Open
+Status:           Closed
 Type:             Bug
 Package:          PDO related
 Operating System: Linux
 PHP Version:      trunk-SVN-2010-06-21 (SVN)
-Assigned To:      
+Assigned To:      ssufficool

 New Comment:

Fixed in trunk revision 300646.


Previous Comments:
------------------------------------------------------------------------
[2010-06-22 04:09:58] ssufficool@php.net

Automatic comment from SVN on behalf of ssufficool
Revision: http://svn.php.net/viewvc/?view=revision&revision=300646
Log: Fix bug #52134

------------------------------------------------------------------------
[2010-06-21 22:52:48] ssufficool at gmail dot com

Description:
------------
pdo_dblib is not returning the correct string length after converting
the data.

Test script:
---------------
$row = $stmt->fetch(PDO::FETCH_ASSOC);
var_dump($row);


Expected result:
----------------
  array(2) {
    ["id"]=>
    string(2) "13"
    ["flag"]=>
    string(1) "0"
  }


Actual result:
--------------
  array(2) {
    ["id"]=>
    string(40) "13                                     "
    ["flag"]=>
    string(40) "0                                      "
  }



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52134&edit=1


Thread (3 messages)

« previous php.bugs (#151750) next »