-
Notifications
You must be signed in to change notification settings - Fork 8k
ext/pgsql: Refactor parameter parsing to remove manual usage of zend_wrong_parameters_count_error() #20068
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
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.
No, see 0a3442f and a previous commit of me.
Blerg, really can't wait to get rid of this jank... |
8a745ec
to
346df2d
Compare
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.
More readable indeed
346df2d
to
2c3acf7
Compare
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 but please see my question.
Also leaving final review for @devnexen as he has worked more on this code than I have.
zval dataset; | ||
php_pgsql_fetch_hash(&dataset, result, row, row_is_null, PGSQL_ASSOC); | ||
|
||
object_init_ex(return_value, ce); |
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 be a pre-existing issue: but can't you make this object_init_ex
call fail by providing an uninstantiable class (e.g. an interface, abstract class, ...). In that case, the code below may break.
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.
that sounds possible and very much a bug fix to me.
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 guess first thing is to fix the bug, then rebase on top of it
Extract pgsql changes from #20066