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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 17:01:31 2024 UTC