Bug #52134 [Com]: pdo_dblib returns 40 char strings for int

From: Date: Sun, 22 Jan 2023 16:09:29 +0000
Subject: Bug #52134 [Com]: pdo_dblib returns 40 char strings for int
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243535@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=52134&edit=1

 ID:                 52134
 Comment by:         xamres dot com at gmail dot com
 Reported by:        ssufficool at gmail dot com
 Summary:            pdo_dblib returns 40 char strings for int
 Status:             Closed
 Type:               Bug
 Package:            PDO related
 Operating System:   Linux
 PHP Version:        trunk-SVN-2010-06-21 (SVN)
 Assigned To:        ssufficool
 Block user comment: N
 Private report:     N

 New Comment:

Now got fixed. getting correct string length after converting the data.

(https://xamres.com).github.com


Previous Comments:
------------------------------------------------------------------------
[2010-06-22 04:11:25] ssufficool@php.net

Fixed in trunk revision 300646.

------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=52134&edit=1


Thread (3 messages)

« previous php.bugs (#243535) next »