From 3c70f5e976a5b1c7a537a5fe0a05db5a533874b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 27 Nov 2024 23:05:14 +0100 Subject: [PATCH] Fix some odbc_*() parameter types --- ext/odbc/odbc.stub.php | 9 +++------ ext/odbc/odbc_arginfo.h | 8 ++++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index f1eb2a890b3..8a54e913e88 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -351,18 +351,15 @@ namespace { function odbc_do(Odbc\Connection $odbc, string $query): Odbc\Result|false {} #ifdef PHP_ODBC_HAVE_FETCH_HASH - /** @param resource $statement */ - function odbc_fetch_object($statement, ?int $row = null): stdClass|false {} + function odbc_fetch_object(Odbc\Result $statement, ?int $row = null): stdClass|false {} - /** @param resource $statement */ - function odbc_fetch_array($statement, ?int $row = null): array|false {} + function odbc_fetch_array(Odbc\Result $statement, ?int $row = null): array|false {} #endif /** - * @param resource $statement * @param array $array */ - function odbc_fetch_into($statement, &$array, ?int $row = null): int|false {} + function odbc_fetch_into(Odbc\Result $statement, &$array, ?int $row = null): int|false {} function odbc_fetch_row(Odbc\Result $statement, ?int $row = null): bool {} diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index d586f5a948e..91df4da846d 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 30ed66d5e97f6615a461d39f40f85a18ba618711 */ + * Stub hash: efd913e4fcacb2949dc5392857032ab9c59c818d */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() @@ -41,18 +41,18 @@ ZEND_END_ARG_INFO() #if defined(PHP_ODBC_HAVE_FETCH_HASH) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_odbc_fetch_object, 0, 1, stdClass, MAY_BE_FALSE) - ZEND_ARG_INFO(0, statement) + ZEND_ARG_OBJ_INFO(0, statement, Odbc\\Result, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_array, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE) - ZEND_ARG_INFO(0, statement) + ZEND_ARG_OBJ_INFO(0, statement, Odbc\\Result, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null") ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_fetch_into, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) - ZEND_ARG_INFO(0, statement) + ZEND_ARG_OBJ_INFO(0, statement, Odbc\\Result, 0) ZEND_ARG_INFO(1, array) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null") ZEND_END_ARG_INFO()