#48038 [NEW]: odbc_execute changes variables used to form params array.
| From: | szeleung dot poon at gmail dot com | Date: | Tue, 21 Apr 2009 16:37:25 +0000 |
| Subject: | #48038 [NEW]: odbc_execute changes variables used to form params array. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-136100@lists.php.net to get a copy of this message | ||
From: szeleung dot poon at gmail dot com
Operating system: Linux linux1 2.6.26-1-686 #1 SMP
PHP version: 5.2.9
PHP Bug Type: ODBC related
Bug description: odbc_execute changes variables used to form params array.
Description:
------------
The odbc_execute documentation says that...
Elements of this array will be converted to strings by calling this
function.
However in what I encountered, more than the array is changed. Variables
used to form the param array are changed as well.
Reproduce code:
---------------
<?php
header("content-type: text/plain");
require_once(dirname(__FILE__)."/config.php"); // define connect params
$odbc = odbc_connect(ODBC_DSN, Username, Password);
$b = false;
$b2 = $b;
$params = array($b2);
?>
Before odbc: <?php var_dump($b, $params); ?>
<?php odbc_execute(odbc_prepare($odbc, "SELECT ?"), $params); ?>
After odbc: <?php var_dump($b, $params); ?>
Expected result:
----------------
Before odbc: bool(false)
array(1) {
[0]=>
bool(false)
}
After odbc: bool(false)
array(1) {
[0]=>
string(0) ""
}
Actual result:
--------------
Before odbc: bool(false)
array(1) {
[0]=>
bool(false)
}
After odbc: string(0) ""
array(1) {
[0]=>
string(0) ""
}
--
Edit bug report at http://bugs.php.net/?id=48038&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48038&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48038&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48038&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48038&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48038&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48038&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48038&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48038&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48038&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48038&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48038&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48038&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48038&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48038&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48038&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48038&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48038&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48038&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48038&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48038&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48038&r=mysqlcfg