Skip to content

Commit 011071a

Browse files
committedSep 11, 2023
Improve invalid cpp modifier message
The ZEND_MODIFIER_TARGET_CPP should really have been called _PARAM, but we shouldn't break API at this point. Fixes GH-12069 Closes GH-12175
1 parent 214afe0 commit 011071a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎Zend/tests/ctor_promotion_additional_modifiers.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ class Test {
99

1010
?>
1111
--EXPECTF--
12-
Fatal error: Cannot use the static modifier on a promoted property in %s on line %d
12+
Fatal error: Cannot use the static modifier on a parameter in %s on line %d

‎Zend/tests/type_declarations/static_type_param.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ class Test {
1212

1313
?>
1414
--EXPECTF--
15-
Fatal error: Cannot use the static modifier on a promoted property in %s on line %d
15+
Fatal error: Cannot use the static modifier on a parameter in %s on line %d

‎Zend/zend_compile.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ uint32_t zend_modifier_token_to_flag(zend_modifier_target target, uint32_t token
869869
} else if (target == ZEND_MODIFIER_TARGET_CONSTANT) {
870870
member = "class constant";
871871
} else if (target == ZEND_MODIFIER_TARGET_CPP) {
872-
member = "promoted property";
872+
member = "parameter";
873873
} else {
874874
ZEND_UNREACHABLE();
875875
}

0 commit comments

Comments
 (0)
Please sign in to comment.