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
Criterion9 php 8 db handling #904
base: master
Are you sure you want to change the base?
Criterion9 php 8 db handling #904
Conversation
added a check to handle when a query has no results instead of referencing an index that doesn't exist, and return null instead of generating an error.
|
||
owa_coreAPI::profile($this, __FUNCTION__, __LINE__); | ||
} catch(\Exception $e) { | ||
$result = false; |
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.
can we log the exception in $this->e->debug()
as well, please?
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.
This may sound silly, but I'm not sure how to edit/update a PR. This would be the first one I have submitted with a request for changes. Is there a preferred process here?
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.
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 added logging of the caught exception. Please let me know if I missed anything getting the PR updated.
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.
lgtm 👍
Added logging of caught exceptions
It's running with your branch on 8.x? |
Pull request checklist
Please check if your PR fulfills the following requirements:
/path/to/php cli.php cmd=build
) was run locally and any changes were pushedPull request type
Please check the type of change your PR introduces:
This PR includes 2 adjustments to db handling based on changes in how PHP handles/returns things.
What is the current behavior?
PHP 8.x sometimes throws errors from empty query results or any variety of exceptions that could be thrown when using the mysqli query functions.
Issue Number: 893
What is the new behavior?
Less errors produced when using php 8.x (tested with 8.1 & 8.2)
Does this introduce a breaking change?
Docs need to be updated?
Other information