Fix a crash bug in the implicit public declaration

This commit is contained in:
Zeev Suraski 2003-03-12 09:38:19 +00:00
parent 39b8f06f9b
commit fa7dc03edb

View File

@ -2358,6 +2358,7 @@ void zend_do_fetch_property(znode *result, znode *object, znode *property TSRMLS
}
*result = opline_ptr->result;
if (CG(active_class_entry)
&& property->op_type == IS_CONST
&& !zend_hash_exists(&CG(active_class_entry)->properties_info, property->u.constant.value.str.val, property->u.constant.value.str.len+1)) {
property->u.constant.value.str.val = estrndup(property->u.constant.value.str.val, property->u.constant.value.str.len);
zend_do_declare_property(property, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_IMPLICIT_PUBLIC TSRMLS_CC);