From: Antony Dovgal Date: Mon, 12 Nov 2007 16:55:44 +0000 (+0000) Subject: MFH: fix error message (reported by Felipe Nascimento) X-Git-Tag: RELEASE_1_3_1~661 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52e773740c89d5177f25cf67cc32ee6d4401e648;p=php MFH: 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 996304bd34..15ed33ab05 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3239,7 +3239,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); }