From: Christoph M. Becker Date: Thu, 24 Sep 2020 08:30:41 +0000 (+0200) Subject: Fix #78470: odbc_specialcolumns() no longer accepts $nullable X-Git-Tag: php-7.3.24RC1~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=610e7d2c77f7af3cc69399e0fdcca0d99300e2ce;p=php Fix #78470: odbc_specialcolumns() no longer accepts $nullable It is mandatory to pass either `SQL_NO_NULLS` or `SQL_NULLABLE` as tenth parameter to `SQLSpecialColumns()`; otherwise the function call fails. Therefore the user must be allowed to pass the desired value as parameter to `odbc_specialcolumns()` again. Closes GH-6200. --- diff --git a/NEWS b/NEWS index 6d8ed53499..35a928af07 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,9 @@ PHP NEWS . Fixed bug #80107 (mysqli_query() fails for ~16 MB long query when compression is enabled). (Nikita) +- ODBC: + . Fixed bug #78470 (odbc_specialcolumns() no longer accepts $nullable). (cmb) + - OPcache: . Fixed bug #80083 (Optimizer pass 6 removes variables used for ibm_db2 data binding). (Nikita) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 4ba9aa2d74..c2d1a8f846 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -3668,7 +3668,7 @@ PHP_FUNCTION(odbc_specialcolumns) SQLUSMALLINT type, scope, nullable; RETCODE rc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "rls!ssl", &pv_conn, &vtype, &cat, &cat_len, &schema, &schema_len, + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rls!ssll", &pv_conn, &vtype, &cat, &cat_len, &schema, &schema_len, &name, &name_len, &vscope, &vnullable) == FAILURE) { return; } diff --git a/ext/odbc/tests/bug78470.phpt b/ext/odbc/tests/bug78470.phpt new file mode 100644 index 0000000000..6910f9bbd1 --- /dev/null +++ b/ext/odbc/tests/bug78470.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #78470 (odbc_specialcolumns() no longer accepts $nullable) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (odbc result)