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.
This commit is contained in:
Christoph M. Becker 2024-08-06 14:34:48 +02:00
parent ca84662c87
commit 6713d51631
No known key found for this signature in database
GPG Key ID: D66C9593118BCCB6

View File

@ -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;
}