pg_query_params modifies null values in array to empty strings
| Bug #46206 | pg_query_params modifies null values in array to empty strings | ||||
|---|---|---|---|---|---|
| Submitted: | 2008-10-01 01:25 UTC | Modified: | 2008-10-01 20:31 UTC | ||
| From: | pierre dot dumuid at adelaide dot edu dot au | Assigned: | |||
| Status: | Closed | Package: | PostgreSQL related | ||
| PHP Version: | 5.2.6 | OS: | Linux | ||
| Private report: | No | CVE-ID: | None | ||
[2008-10-01 01:25 UTC] 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) "" }
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2008-10-01 20:31 UTC] iliaa@php.net