Skip to content

Commit 6713d51

Browse files
committed
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). Closes GH-15254.
1 parent ca84662 commit 6713d51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/odbc/tests/odbc_data_source_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ include 'config.inc';
1717
$conn = odbc_connect($dsn, $user, $pass);
1818

1919
try {
20-
var_dump(odbc_data_source($conn, NULL));
20+
var_dump(odbc_data_source($conn, SQL_FETCH_FIRST + SQL_FETCH_NEXT));
2121
} catch (\ValueError $e) {
2222
echo $e->getMessage() . \PHP_EOL;
2323
}

0 commit comments

Comments
 (0)