Skip to content

Conversation

@ndossche
Copy link
Member

@ndossche ndossche commented Nov 9, 2025

Side-note: In a follow-up for master I'm going to factor out some of this code.

Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side-note: In a follow-up for master I'm going to factor out some of this code.

Yeah, this can / should be object_init_with_constructor() at the very least. 👍

@ndossche
Copy link
Member Author

ndossche commented Nov 9, 2025

Yeah, this can / should be object_init_with_constructor() at the very least. 👍

Yeah and I planned on factoring out the attribute lookup for the is_sensitive boolean too.

@ndossche ndossche marked this pull request as ready for review November 9, 2025 20:02
zval *arg;

bool is_sensitive = false;
if (call->func->common.fn_flags & ZEND_ACC_VARIADIC) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think that's implied by ZEND_CALL_HAS_EXTRA_NAMED_PARAMS: We can't have extra named params on non-variadic functions

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct. zend_handle_named_arg even states this in a comment. I'll adjust to an assert.

@ndossche ndossche closed this in 33a2acb Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SensitiveParameter doesn't work for named argument passing to variadic parameter

4 participants