From b9fdf3aca9f3c050a42f23e71ac8dc7ce7ee2b74 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 6 Aug 2024 14:34:48 +0200 Subject: [PATCH] Fix odbc_data_source_001.phpt As of PHP 8.1.0, passing `null` to an `int` parameter is deprecated, and as such the deprecation notice breaks the test. So we instead pass an integer, and to avoid hard-coding a value we just add the two supported constants (which are supposed to have the values `1` and `2`, respectively). --- ext/odbc/tests/odbc_data_source_001.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/odbc/tests/odbc_data_source_001.phpt b/ext/odbc/tests/odbc_data_source_001.phpt index b546de2cd9d8c..5ab3c6ca5c524 100644 --- a/ext/odbc/tests/odbc_data_source_001.phpt +++ b/ext/odbc/tests/odbc_data_source_001.phpt @@ -17,7 +17,7 @@ include 'config.inc'; $conn = odbc_connect($dsn, $user, $pass); try { - var_dump(odbc_data_source($conn, NULL)); + var_dump(odbc_data_source($conn, SQL_FETCH_FIRST + SQL_FETCH_NEXT)); } catch (\ValueError $e) { echo $e->getMessage() . \PHP_EOL; }