Skip to content

Commit 555e7ec

Browse files
committed
Merge branch 'PHP-7.4' into master
* PHP-7.4: Fix #78470: odbc_specialcolumns() no longer accepts $nullable
2 parents c25b5c6 + 901d022 commit 555e7ec

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

ext/odbc/odbc.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function odbc_foreignkeys($connection_id, ?string $pk_qualifier, string $pk_owne
174174
* @param resource $connection_id
175175
* @return resource|false
176176
*/
177-
function odbc_specialcolumns($connection_id, int $type, ?string $qualifier, string $owner, string $table, int $scope) {}
177+
function odbc_specialcolumns($connection_id, int $type, ?string $qualifier, string $owner, string $table, int $scope, int $nullable) {}
178178

179179
/**
180180
* @param resource $connection_id

ext/odbc/odbc_arginfo.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 57db79b23d127851f985d9b6280b113637384a68 */
2+
* Stub hash: b533372de4f1110216b2545121d7851022980650 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0)
55
ZEND_END_ARG_INFO()
@@ -211,13 +211,14 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_foreignkeys, 0, 0, 7)
211211
ZEND_END_ARG_INFO()
212212
#endif
213213

214-
ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_specialcolumns, 0, 0, 6)
214+
ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_specialcolumns, 0, 0, 7)
215215
ZEND_ARG_INFO(0, connection_id)
216216
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
217217
ZEND_ARG_TYPE_INFO(0, qualifier, IS_STRING, 1)
218218
ZEND_ARG_TYPE_INFO(0, owner, IS_STRING, 0)
219219
ZEND_ARG_TYPE_INFO(0, table, IS_STRING, 0)
220220
ZEND_ARG_TYPE_INFO(0, scope, IS_LONG, 0)
221+
ZEND_ARG_TYPE_INFO(0, nullable, IS_LONG, 0)
221222
ZEND_END_ARG_INFO()
222223

223224
ZEND_BEGIN_ARG_INFO_EX(arginfo_odbc_statistics, 0, 0, 6)

ext/odbc/php_odbc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3298,7 +3298,7 @@ PHP_FUNCTION(odbc_specialcolumns)
32983298
SQLUSMALLINT type, scope, nullable;
32993299
RETCODE rc;
33003300

3301-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rls!ssl", &pv_conn, &vtype, &cat, &cat_len, &schema, &schema_len,
3301+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rls!ssll", &pv_conn, &vtype, &cat, &cat_len, &schema, &schema_len,
33023302
&name, &name_len, &vscope, &vnullable) == FAILURE) {
33033303
RETURN_THROWS();
33043304
}

ext/odbc/tests/bug78470.phpt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Bug #78470 (odbc_specialcolumns() no longer accepts $nullable)
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('odbc')) die('skip odbc extension not available');
6+
?>
7+
--FILE--
8+
<?php
9+
include 'config.inc';
10+
11+
$conn = odbc_connect($dsn, $user, $pass);
12+
var_dump(odbc_specialcolumns($conn, SQL_BEST_ROWID, '', '', '', SQL_SCOPE_CURROW, SQL_NO_NULLS));
13+
?>
14+
--EXPECTF--
15+
resource(%d) of type (odbc result)

0 commit comments

Comments
 (0)