diff options
| -rw-r--r-- | Zend/tests/errmsg_038.phpt | 2 | ||||
| -rw-r--r-- | Zend/zend_compile.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Zend/tests/errmsg_038.phpt b/Zend/tests/errmsg_038.phpt index fdab803ba8..2927e945fe 100644 --- a/Zend/tests/errmsg_038.phpt +++ b/Zend/tests/errmsg_038.phpt @@ -10,4 +10,4 @@ class test { echo "Done\n"; ?> --EXPECTF-- -Fatal error: Cannot declare property test::$var final, the final modifier is allowed only for methods in %s on line %d +Fatal error: Cannot declare property test::$var final, the final modifier is allowed only for methods and classes in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 2d5699e70b..0a7c5a338d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3005,7 +3005,7 @@ void zend_do_declare_property(znode *var_name, znode *value, zend_uint access_ty } if (access_type & ZEND_ACC_FINAL) { - zend_error(E_COMPILE_ERROR, "Cannot declare property %s::$%s final, the final modifier is allowed only for methods", + zend_error(E_COMPILE_ERROR, "Cannot declare property %s::$%s final, the final modifier is allowed only for methods and classes", CG(active_class_entry)->name, var_name->u.constant.value.str.val); } |
