[php-src] PR #15254: Fix odbc_data_source_001.phpt
| From: | cmb69 | Date: | Tue, 06 Aug 2024 12:40:39 +0000 |
| Subject: | [php-src] PR #15254: Fix odbc_data_source_001.phpt | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-27697@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/15254
Author: cmb69
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).
---
Note that [this test is skipped in
CI](https://github.com/php/php-src/actions/runs/10265811205/job/28402785672?pr=15253#step:6:436)
since no data sources are configured. [Programatically configuring data
sources](https://learn.microsoft.com/en-us/cpp/data/odbc/data-source-programmatically-configuring-an-odbc-data-source?view=msvc-170)
(file data sources won't work) is possible, but would require some new code in ext/zend_test or
fiddling with the registry manually. I don't think that running this test in CI justifies the
required effort, though.