1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #46050: odbc_next_result corrupts prepared resource
This commit is contained in:
Christoph M. Becker
2020-10-05 17:47:21 +02:00
3 changed files with 29 additions and 0 deletions

1
NEWS
View File

@@ -20,6 +20,7 @@ PHP NEWS
(cmb)
. Fixed bug #80150 (Failure to fetch error message). (cmb)
. Fixed bug #80152 (odbc_execute() moves internal pointer of $params). (cmb)
. Fixed bug #46050 (odbc_next_result corrupts prepared resource). (cmb)
- OPcache:
. Fixed bug #80083 (Optimizer pass 6 removes variables used for ibm_db2 data

View File

@@ -2772,6 +2772,7 @@ PHP_FUNCTION(odbc_next_result)
}
efree(result->values);
result->values = NULL;
result->numcols = 0;
}
result->fetched = 0;

View File

@@ -0,0 +1,27 @@
--TEST--
Bug #46050 (odbc_next_result corrupts prepared resource)
--SKIPIF--
<?php include 'skipif.inc'; ?>
--FILE--
<?php
include __DIR__ . "/config.inc";
$conn = odbc_connect($dsn, $user, $pass);
$stmt = odbc_prepare($conn, "SELECT 1");
var_dump(odbc_execute($stmt));
var_dump(odbc_fetch_array($stmt));
var_dump(odbc_next_result($stmt));
var_dump(odbc_execute($stmt));
var_dump(odbc_fetch_array($stmt));
?>
--EXPECT--
bool(true)
array(1) {
["1"]=>
string(1) "1"
}
bool(false)
bool(true)
array(1) {
["1"]=>
string(1) "1"
}