From: Antony Dovgal Date: Mon, 12 Nov 2007 16:55:28 +0000 (+0000) Subject: fix error message (reported by Felipe Nascimento) X-Git-Tag: RELEASE_2_0_0a1~1387 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c07db4420ca3dea155c5a2b44a9dabf3943c743;p=php fix error message (reported by Felipe Nascimento) --- 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)); }