Skip to content

Commit 1c07b11

Browse files
committed
Deprecate odbc_result_all()
Part of https://wiki.php.net/rfc/deprecations_php_8_1.
1 parent 625b89a commit 1c07b11

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,10 @@ PHP 8.1 UPGRADE NOTES
364364
parent::init() with parent::__construct().
365365
RFC: https://wiki.php.net/rfc/deprecations_php_8_1
366366

367+
- ODBC:
368+
. odbc_result_all() has been deprecated.
369+
RFC: https://wiki.php.net/rfc/deprecations_php_8_1
370+
367371
- PDO:
368372
. The PDO::FETCH_SERIALIZE mode has been deprecated.
369373
RFC: https://wiki.php.net/rfc/phase_out_serializable

ext/odbc/odbc.stub.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ function odbc_fetch_row($statement, ?int $row = null): bool {}
6060
/** @param resource $statement */
6161
function odbc_result($statement, string|int $field): string|bool|null {}
6262

63-
/** @param resource $statement */
63+
/**
64+
* @param resource $statement
65+
* @deprecated
66+
*/
6467
function odbc_result_all($statement, string $format = ""): int|false {}
6568

6669
/** @param resource $statement */

ext/odbc/odbc_arginfo.h

Lines changed: 2 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: 6d7d8d8f495236297745b9b1087e5cf955976127 */
2+
* Stub hash: 27a50ba79ed632721ee458527ef543e4b44ee897 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0)
55
ZEND_END_ARG_INFO()
@@ -330,7 +330,7 @@ static const zend_function_entry ext_functions[] = {
330330
ZEND_FE(odbc_fetch_into, arginfo_odbc_fetch_into)
331331
ZEND_FE(odbc_fetch_row, arginfo_odbc_fetch_row)
332332
ZEND_FE(odbc_result, arginfo_odbc_result)
333-
ZEND_FE(odbc_result_all, arginfo_odbc_result_all)
333+
ZEND_DEP_FE(odbc_result_all, arginfo_odbc_result_all)
334334
ZEND_FE(odbc_free_result, arginfo_odbc_free_result)
335335
ZEND_FE(odbc_connect, arginfo_odbc_connect)
336336
ZEND_FE(odbc_pconnect, arginfo_odbc_pconnect)

ext/odbc/tests/bug44618.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ array(3) {
5959

6060
Warning: odbc_result(): Cannot get data of column #3 (retcode 100) in %s on line %d
6161
bool(false)
62+
63+
Deprecated: Function odbc_result_all() is deprecated in %s on line %d
6264
<table><tr><th>ID</th><th>real1</th><th>text1</th></tr>
6365
<tr><td>1</td><td>10.02</td><td></td></tr></table>
6466
Warning: odbc_result_all(): Cannot get data of column #3 (retcode 100) in %s on line %d

0 commit comments

Comments
 (0)