]> granicus.if.org Git - php/commitdiff
Fix a crash bug in the implicit public declaration
authorZeev Suraski <zeev@php.net>
Wed, 12 Mar 2003 09:38:19 +0000 (09:38 +0000)
committerZeev Suraski <zeev@php.net>
Wed, 12 Mar 2003 09:38:19 +0000 (09:38 +0000)
Zend/zend_compile.c

index b995c2fb2d2bf00e4d899e0da470964a87c80a57..749d8f49357ead8e456cee9806b04518df339fbf 100644 (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);