#46294 [Opn->Csd]: pg_send_query_params converts all elements in 'params' to strings
| From: | rob dot linton at donatgroup dot com | Date: | Wed, 15 Oct 2008 17:59:55 +0000 |
| Subject: | #46294 [Opn->Csd]: pg_send_query_params converts all elements in 'params' to strings | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-129730@lists.php.net to get a copy of this message | ||
ID: 46294
User updated by: rob dot linton at donatgroup dot com
Reported By: rob dot linton at donatgroup dot com
-Status: Open
+Status: Closed
Bug Type: PostgreSQL related
Operating System: Windows XP
PHP Version: 5.2.6
New Comment:
closing.
Previous Comments:
------------------------------------------------------------------------
[2008-10-15 17:59:40] rob dot linton at donatgroup dot com
This has been fixed in 5.3.0alpha3-dev.
Sorry for the noise.
------------------------------------------------------------------------
[2008-10-15 13:42:07] felipe@php.net
I can't reproduce it.
------------------------------------------------------------------------
[2008-10-14 22:41:25] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2008-10-14 22:32:00] rob dot linton at donatgroup dot com
Description:
------------
This is just as described here:
http://bugs.php.net/bug.php?id=43279
Variables passed into the $params array of pg_send_query_params() are
converted to strings as if they were passed by reference.
Reproduce code:
---------------
$pg = pg_connect();
$int = null;
$int2 = 99;
echo '$int = '.var_export($int, true).'<br />';
echo '$int2 = '.var_export($int2, true).'<br /><br />';
$q = 'INSERT INTO val (val_int, val_int2) VALUES($1, $2)';
pg_send_query_params($pg, $q, array($int,$int2));
$result = pg_get_result($pg);
echo '$int = '.var_export($int, true).'<br />';
echo '$int2 = '.var_export($int2, true).'<br /><br />';
Expected result:
----------------
$int = NULL
$int2 = 99
$int = NULL
$int2 = 99
Actual result:
--------------
$int = NULL
$int2 = 99
$int = ''
$int2 = '99'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46294&edit=1