-
Notifications
You must be signed in to change notification settings - Fork 37
odbc back-end resource handling broken on PHP 8.4 #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It does not feel there is more than copy / pasting from what I have come up with for PgSQL. Unfortunately that pull request is still in the queue, so there may not be that many people affected by these changes to start with. |
I wrote a change request on your pull request. |
I couldn't see a change request in PR #43, so I've submitted one of my own. |
I have updated my PR as per comments. TBH, I only got to modifying this code after I started running into issues when updating some legacy product to make it work with PHP 8.3+, so backwards compatibility was not top of mind for me. But thank you for pointing it out. |
I have added a draft PR for this: #47 . I have no means to test it out myself, so please feel free to copy/paste and see if it makes any difference. |
Note: This task is similar to #37 which raised similar issues with the pgsql back-end, on PHP 8.1
Since PHP 8.4, various odbc methods now return a PHP object rather than a resource.
From https://www.php.net/manual/en/migration84.incompatible.php#migration84.incompatible.resource2object.odbc:
In PEAR::DB, the
DB_pdbc
class is implemented on the assumption that the returned result is a PHPresource
reference. In particular, there are variousis_resource()
checks that will no longer work as expected as this function only returns true for theresource
implementation.The class needs to be updated to handle both implementations, in order to support older PHP versions as well as continuing to run on PHP >= 8.4.
The text was updated successfully, but these errors were encountered: