ID: 48038 Updated by: [email protected] Reported By: szeleung dot poon at gmail dot com -Status: Open +Status: Closed Bug Type: ODBC related Operating System: Linux linux1 2.6.26-1-686 #1 SMP PHP Version: 5.2.9 New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Fixed in 5.2.9, 5.3 and HEAD. Previous Comments: ------------------------------------------------------------------------ [2009-04-21 16:37:25] szeleung dot poon at gmail dot com 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 this bug report at http://bugs.php.net/?id=48038&edit=1
