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

Add a Patch

Pull Requests

Add a Pull Request

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: Sat Jun 15 16:01:30 2024 UTC