Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Minor fixes to avoid PHP warnings in v8.2+ #952
Minor fixes to avoid PHP warnings in v8.2+ #952
Changes from 1 commit
9b1f583
82a9860
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be more appropriate to add this fix in ADORecordSet::Close() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, that would make more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not sure that is the right fix actually, as this will prevent execution of cleanup tasks (e.g. freeing additional result sets in the mysql driver).
I believe that each driver should handle this specifically to ensure they don't break when _queryID == -1. At least some of them already do that (but I didn't check them all):
ADOdb/drivers/adodb-mysqli.inc.php
Lines 1644 to 1646 in 1a008f9
ADOdb/drivers/adodb-postgres64.inc.php
Lines 1095 to 1097 in 1a008f9
ADOdb/drivers/adodb-oci8.inc.php
Lines 1837 to 1838 in 1a008f9
DB2 and firebird don't have such checks.
Was this just preventive maintenance, or did you run into an actual error or warning ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We definitely hit an error here, passing a string where a connection object is required.
Our internal ADODB branch has been out-of-sync with upstream for over a decade now. It's possible we missed some upstream changes that resolved some of our issues in other ways.
These are some of the last bits to bring it back in sync though, so that will be nice. We can leave this out for now and we will run further tests and let you know if there still a problem.
Thanks for your prompt response with these PR's.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're welcome. So should I close this PR then ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure