php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56615 bindParam/bindValue retain the is_null flag
Submitted: 2005-10-27 22:40 UTC Modified: 2005-10-28 22:42 UTC
From: curt@php.net Assigned: wez (profile)
Status: Closed Package: PDO_Mysql (PECL)
PHP Version: 5_1 CVS-2005-10-27 (dev) OS: *
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: curt@php.net
New email:
PHP Version: OS:

 

 [2005-10-27 22:40 UTC] curt@php.net
Description:
------------
When using ::bindParam() or ::bindValue(), as soon as a null or PDO::PARAM_NULL is used, the driver retains the is_null value for the rest of the calls.



Reproduce code:
---------------
Source code sample:
http://zirzow.dyndns.org/patches/mysql_statement.c.phps

Patch:
http://zirzow.dyndns.org/patches/mysql_statement.c.patch

Expected result:
----------------
array(3) {
  [0]=>
  array(1) {
    ["bar"]=>
    string(3) "foo"
  }
  [1]=>
  array(1) {
    ["bar"]=>
    NULL
  }
  [2]=>
  array(1) {
    ["bar"]=>
    string(3) "qaz"
  }
}


Actual result:
--------------
array(3) {
  [0]=>
  array(1) {
    ["bar"]=>
    string(3) "foo"
  }
  [1]=>
  array(1) {
    ["bar"]=>
    NULL
  }
  [2]=>
  array(1) {
    ["bar"]=>
    NULL
  }
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-28 22:42 UTC] wez@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Thanks for the patch; I used a smaller version of it :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC