Commit 1364de0472b for php.net
commit 1364de0472b859917f5bc0be9193bd8068fc2061
Merge: 673896f8e91 3f9d0bc8ea3
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date: Mon Sep 7 18:42:07 2026 -0400
Merge branch 'PHP-8.5'
* PHP-8.5:
odbc: check SQLColAttribute return codes in the field info functions
diff --cc NEWS
index cae4c0bbcc6,56204f6ecc6..1b2e879fcaf
--- a/NEWS
+++ b/NEWS
@@@ -52,17 -60,30 +52,22 @@@ PH
replacement when a \k<name> backref has no closing delimiter.
(Ilia Alshanetsky)
+ - ODBC:
+ . Fixed odbc_field_len(), odbc_field_scale() and odbc_field_type()
+ returning uninitialized memory when SQLColAttribute fails.
+ (Ilia Alshanetsky)
+
-- Opcache:
- . Fixed opcache.protect_memory race under ZTS. (realFlowControl)
- . Fixed a tracing JIT crash when compiling a side trace for a method of a
- class that could not be stored in the inheritance cache. (GH-21710)
- (Arnaud, iliaal)
- . Fixed a crash when the huge page SHM remap discarded mappings outside the
- reserved address range. (Piotr Hałas)
-
-- PDO:
- . Fixed a leak when a persistent connection failed a liveness check
- with no other live PDO handle. (iliaal)
+- PCNTL:
+ . Fixed the declared signature of pcntl_signal(), whose $restart_syscalls
+ argument accepts null and defaults to it. (lacatoire)
- PDO_PGSQL:
- . Fixed PDO::CURSOR_SCROLL statements failing under lazy fetching
- (PDO::ATTR_PREFETCH => 0). (KentarouTakeda)
+ . Added Pdo\Pgsql::ATTR_CHUNK_SIZE to fetch a result set in chunks of the
+ given number of rows. (KentarouTakeda)
-- PDO Sqlite:
- . Fixed bug GH-20214 (PDO::FETCH_DEFAULT unexpected behavior with
- PDOStatement::setFetchMode). (SakiTakamachi)
+- PGSQL:
+ . Fixed the pg_insert(), pg_update() and pg_delete() flag error messages,
+ which did not name the set of flags actually accepted. (lacatoire)
- Phar:
. Fixed bug GH-23418 (Use-after-free when looking up mounted directories).
diff --cc ext/odbc/php_odbc.c
index 5a1a20e1068,3ed365cab96..d1cf2716cfc
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@@ -788,14 -806,16 +808,15 @@@ static void odbc_colattribute_failed(od
void odbc_column_lengths(INTERNAL_FUNCTION_PARAMETERS, int type)
{
odbc_result *result;
+ RETCODE rc;
SQLLEN len;
- zval *pv_res;
zend_long pv_num;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &pv_res, odbc_result_ce, &pv_num) == FAILURE) {
- RETURN_THROWS();
- }
+ ZEND_PARSE_PARAMETERS_START(2, 2)
+ Z_PARAM_ODBC_RESULT(result)
+ Z_PARAM_LONG(pv_num)
+ ZEND_PARSE_PARAMETERS_END();
- result = Z_ODBC_RESULT_P(pv_res);
CHECK_ODBC_RESULT(result);
if (pv_num < 1) {
@@@ -2315,13 -2475,15 +2340,14 @@@ PHP_FUNCTION(odbc_field_type
odbc_result *result;
char tmp[32];
SQLSMALLINT tmplen;
+ RETCODE rc;
- zval *pv_res;
zend_long pv_num;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &pv_res, odbc_result_ce, &pv_num) == FAILURE) {
- RETURN_THROWS();
- }
+ ZEND_PARSE_PARAMETERS_START(2, 2)
+ Z_PARAM_ODBC_RESULT(result)
+ Z_PARAM_LONG(pv_num)
+ ZEND_PARSE_PARAMETERS_END();
- result = Z_ODBC_RESULT_P(pv_res);
CHECK_ODBC_RESULT(result);
if (pv_num < 1) {