php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52134 pdo_dblib returns 40 char strings for int
Submitted: 2010-06-21 22:52 UTC Modified: 2010-06-22 04:11 UTC
From: ssufficool at gmail dot com Assigned: ssufficool (profile)
Status: Closed Package: PDO related
PHP Version: trunk-SVN-2010-06-21 (SVN) OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ssufficool at gmail dot com
New email:
PHP Version: OS:

 

 [2010-06-21 22:52 UTC] 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                                      "
  }


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-22 04:09 UTC] 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-22 04:11 UTC] ssufficool@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: ssufficool
 [2010-06-22 04:11 UTC] ssufficool@php.net
Fixed in trunk revision 300646.
 [2023-01-22 16:09 UTC] xamres dot com at gmail dot com
Now got fixed. getting correct string length after converting the data.

(https://xamres.com).github.com
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 20:01:35 2025 UTC