Uh oh!
There was an error while loading. Please reload this page.
tree-wide: Replace ZEND_WRONG_PARAM_COUNT() by its definition - #20066
Conversation
This is a direct alias.
This macro was hiding control flow (the return statement) and thus was particularly unhygienic.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TimWolla
commented
Oct 5, 2025
@Girgias I also considered improving the error messages, but I'm not really familiar with all the extensions and I also wanted to avoid combining the internal cleanup with a behavioral change. Especially when the API needs this function, it is not great in the first place, so I feel improving the error message is a little like polishing a turd. So I just did the mechanical change that allowed to clean up zend_API 😄 |
bwoebi
left a comment
There was a problem hiding this comment.
I don't think we should do that.
This macro is simple enough and properly abstracts what it does.
I don't mind a rename/alias to RETURN_WRONG_PARAM_COUNT(); or similar, if you want to indicate the control flow as part of the macro.
TimWolla
commented
Oct 13, 2025
It feels odd that this specific exception-throwing function (which is already very rarely needed and will be needed even more rarely once Gina's PRs ship) is special-cased by having a macro that implies the return when all other exception-throwing functions don't. |
Uh oh!
There was an error while loading. Please reload this page.
This macro was hiding control flow (the return statement) and thus was particularly unhygienic.