From 0c07db4420ca3dea155c5a2b44a9dabf3943c743 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Mon, 12 Nov 2007 16:55:28 +0000 Subject: [PATCH] fix error message (reported by Felipe Nascimento) --- Zend/tests/errmsg_038.phpt | 2 +- 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 5582beded0..588159aea4 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3537,7 +3537,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 %v::$%R final, the final modifier is allowed only for methods", + zend_error(E_COMPILE_ERROR, "Cannot declare property %v::$%R final, the final modifier is allowed only for methods and classes", CG(active_class_entry)->name, Z_TYPE(var_name->u.constant), Z_UNIVAL(var_name->u.constant)); } -- 2.50.1