mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #80152: odbc_execute() moves internal pointer of $params
This commit is contained in:
commit
b87e43d931
1
NEWS
1
NEWS
@ -19,6 +19,7 @@ PHP NEWS
|
||||
. Fixed bug #80147 (BINARY strings may not be properly zero-terminated).
|
||||
(cmb)
|
||||
. Fixed bug #80150 (Failure to fetch error message). (cmb)
|
||||
. Fixed bug #80152 (odbc_execute() moves internal pointer of $params). (cmb)
|
||||
|
||||
- OPcache:
|
||||
. Fixed bug #80083 (Optimizer pass 6 removes variables used for ibm_db2 data
|
||||
|
@ -1309,7 +1309,7 @@ PHP_FUNCTION(odbc_execute)
|
||||
int numArgs = ZEND_NUM_ARGS(), i, ne;
|
||||
RETCODE rc;
|
||||
|
||||
if (zend_parse_parameters(numArgs, "r|a", &pv_res, &pv_param_arr) == FAILURE) {
|
||||
if (zend_parse_parameters(numArgs, "r|a/", &pv_res, &pv_param_arr) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
26
ext/odbc/tests/bug80152.phpt
Normal file
26
ext/odbc/tests/bug80152.phpt
Normal file
@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #80152 (odbc_execute() moves internal pointer of $params)
|
||||
--SKIPIF--
|
||||
<?php include 'skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
include 'config.inc';
|
||||
|
||||
$conn = odbc_connect($dsn, $user, $pass);
|
||||
odbc_exec($conn,"CREATE TABLE bug80152 (id INT, name CHAR(24))");
|
||||
$stmt = odbc_prepare($conn,"INSERT INTO bug80152 (id, name) VALUES (?, ?)");
|
||||
$params = [1, "John", "Lim"];
|
||||
var_dump(key($params));
|
||||
odbc_execute($stmt, $params);
|
||||
var_dump(key($params));
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
include 'config.inc';
|
||||
|
||||
$conn = odbc_connect($dsn, $user, $pass);
|
||||
odbc_exec($conn, "DROP TABLE bug80152");
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
int(0)
|
Loading…
Reference in New Issue
Block a user