ID:               46294
 Updated by:       [EMAIL PROTECTED]
 Reported By:      rob dot linton at donatgroup dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         PostgreSQL related
 Operating System: Windows XP
 PHP Version:      5.2.6
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to