-
Notifications
You must be signed in to change notification settings - Fork 8k
Mysqli: fix missing error for invalid mysqli_options() option #20971
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
base: master
Are you sure you want to change the base?
Conversation
…cting report_mode
…cting report_mode
…cting report_mode
…cting report_mode
…cting report_mode
iluuu1994
left a comment
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.
From what I can see (as somebody who doesn't maintain this code), most arguments are validated without the MYSQLI_REPORT_ERROR guard, and throw a zend_argument_value_error().
But somebody who does maintain this should confirm.
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
…cting report_mode
- if (MyG(report_mode) & MYSQLI_REPORT_ERROR) {
zend_value_error("mysqli_options(): Invalid option %d", (int)mysql_option);Do we need to remove |
|
Somebody else should review this. /cc @Girgias @SakiTakamachi |
|
First of all, I don't know if this should be an error condition. I guess it kind of makes sense. But as you can see in the test, no message was the behaviour by design. The error should be without the guard and without the function name in the message. It seems to me like you have also put it in the wrong place. Judging by the message and the test, you wanted to put it in the switch statement after that. The message isn't very descriptive either. What does it mean "invalid option"? What should the user do differently? |
#20968