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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2020 The PHP Group
All rights reserved.
Last updated: Sat Sep 19 16:01:24 2020 UTC