From fa7dc03edbe2e193393d3969301f95f45e6ad489 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Wed, 12 Mar 2003 09:38:19 +0000 Subject: [PATCH] Fix a crash bug in the implicit public declaration --- Zend/zend_compile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index b995c2fb2d..749d8f4935 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -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); -- 2.50.1