#
4a0ec3de |
| 10-Apr-2024 |
Máté Kocsis |
Make ext/odbc default value handling more consistent (#13910) These changes are carved off from https://github.com/php/php-src/pull/12040/files. I noticed that there are some inconsistencies
Make ext/odbc default value handling more consistent (#13910) These changes are carved off from https://github.com/php/php-src/pull/12040/files. I noticed that there are some inconsistencies between odbc_fetch_object()/odbc_fetch_array(), odbc_fetch_into(), as well as odbc_fetch_row(), specifically in how they handle the $row parameter. Now, I tried to align their behaviour the following way: - I made null the default value. Previously, the default values were one of the following: -1, -1, 0, and null, respectively. - odbc_fetch_row() has been returning false indicating there is no more rows when 0 is passed as $row. Now, a warning is also emitted in this case, because the null default value is not new, because it's available since PHP 8.0. - When HAVE_SQL_EXTENDED_FETCH is not defined, the $row parameter is always ignored. Previously, some of the functions didn't accept it at all. Now a warning is emitted if the feature is not supported, but the parameter has any meaningful value (is greater than or equal to 1).
show more ...
|