php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37516 pg_execute modifies the params array
Submitted: 2006-05-19 08:42 UTC Modified: 2006-05-19 08:44 UTC
From: ce at netage dot bg Assigned:
Status: Not a bug Package: PostgreSQL related
PHP Version: 5.1.4 OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ce at netage dot bg
New email:
PHP Version: OS:

 

 [2006-05-19 08:42 UTC] ce at netage dot bg
Description:
------------
when executing pg_execute it modifies the null values in 
the params array to an empty string

Reproduce code:
---------------
$conn = pg_connect('dbname=test');

$param_list = array(null, );

var_dump($param_list);

pg_prepare($conn, 'test', 'INSERT INTO nullproblem2 VALUES ($1)');
pg_execute($conn, 'test', $param_list);

var_dump($param_list);


Expected result:
----------------
array(1) {
  [0]=>
  NULL
}
array(1) {
  [0]=>
  NULL
}


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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-19 08:44 UTC] tony2001@php.net
Duplicate of bug #35675.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 00:01:30 2024 UTC