Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Suggestions from TimWolla
  • Loading branch information
DanielEScherzer committed Aug 17, 2025
commit 74b10f922daf41f33108ab2b7517b9031af97b81
8 changes: 2 additions & 6 deletions Zend/zend_attributes.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ static zend_string *validate_allow_dynamic_properties(
msg = "Cannot apply #[\\AllowDynamicProperties] to enum %s";
}
if (msg != NULL) {
smart_str str = {0};
smart_str_append_printf(&str, msg, ZSTR_VAL(scope->name));
return smart_str_extract(&str);
return zend_strpprintf(0, msg, ZSTR_VAL(scope->name));
}
scope->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES;
return NULL;
Expand All @@ -107,9 +105,7 @@ static zend_string *validate_attribute(
msg = "Cannot apply #[\\Attribute] to abstract class %s";
}
if (msg != NULL) {
smart_str str = {0};
smart_str_append_printf(&str, msg, ZSTR_VAL(scope->name));
return smart_str_extract(&str);
return zend_strpprintf(0, msg, ZSTR_VAL(scope->name));
}
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -7604,7 +7604,7 @@ static void zend_compile_attributes(
if (run_validator && config->validator != NULL) {
zend_string *error = config->validator(attr, target, CG(active_class_entry));
if (error != NULL) {
if (delayed_target_validation == false) {
if (delayed_target_validation == NULL) {
zend_error_noreturn(E_COMPILE_ERROR, "%s", ZSTR_VAL(error));
zend_string_efree(error);
} else {
Expand Down