1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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
This commit is contained in:
Ilija Tovilo
2023-09-11 13:57:37 +02:00
parent 214afe0d96
commit 011071a3b3
3 changed files with 3 additions and 3 deletions

View File

@@ -9,4 +9,4 @@ class Test {
?>
--EXPECTF--
Fatal error: Cannot use the static modifier on a promoted property in %s on line %d
Fatal error: Cannot use the static modifier on a parameter in %s on line %d

View File

@@ -12,4 +12,4 @@ class Test {
?>
--EXPECTF--
Fatal error: Cannot use the static modifier on a promoted property in %s on line %d
Fatal error: Cannot use the static modifier on a parameter in %s on line %d

View File

@@ -869,7 +869,7 @@ uint32_t zend_modifier_token_to_flag(zend_modifier_target target, uint32_t token
} else if (target == ZEND_MODIFIER_TARGET_CONSTANT) {
member = "class constant";
} else if (target == ZEND_MODIFIER_TARGET_CPP) {
member = "promoted property";
member = "parameter";
} else {
ZEND_UNREACHABLE();
}