#46206 [Opn->Csd]: pg_query_params modifies null values in array to empty strings
ID: 46206
Updated by: iliaa@php.net
Reported By: pierre dot dumuid at adelaide dot edu dot au
-Status: Open
+Status: Closed
Bug Type: PostgreSQL related
Operating System: Linux
PHP Version: 5.2.6
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2008-10-01 01:25:56] pierre dot dumuid at adelaide dot edu dot au
Description:
------------
pg_query_params modifies null values in array to empty strings.
(similar, but different to bug #36606, I can verify that #36606 is
fixed for me!)
Reproduce code:
---------------
// createdb saga3;
// echo 'CREATE TABLE pais (idpais integer);' | psql saga3
$a = pg_connect("dbname=saga3");
$b = array(null);
var_dump($b);
pg_query_params($a, "SELECT * FROM pais WHERE idpais = $1", $b);
var_dump($b);
die;
Expected result:
----------------
array(1) {
[0]=>
NULL
}
array(1) {
[0]=>
NULL
}
Actual result:
--------------
array(1) {
[0]=>
NULL
}
array(1) {
[0]=>
string(0) ""
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46206&edit=1
Thread (2 messages)