#46294 [NEW]: pg_send_query_params converts all elements in 'params' to strings
From: rob dot linton at donatgroup dot com
Operating system: Windows XP
PHP version: 5.2.6
PHP Bug Type: PostgreSQL related
Bug description: pg_send_query_params converts all elements in 'params' to strings
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 bug report at http://bugs.php.net/?id=46294&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46294&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46294&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46294&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46294&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=46294&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46294&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46294&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46294&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46294&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46294&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46294&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46294&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46294&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46294&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46294&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46294&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46294&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46294&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46294&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46294&r=mysqlcfg
Thread (5 messages)
- rob dot linton at donatgroup dot com