X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=missing.c;h=3e7dbfabb1c2cff7a3940b4f0d55c5eb105a2bda;hp=dcf4709a84b8dab11cb267790e757e13c7003c6c;hb=1b093720ee0708c101a273e739ddb774f7d7f6d0;hpb=0d925a2820b9d75b8e32c451fd400863e51e22fe diff --git a/missing.c b/missing.c index dcf4709..3e7dbfa 100644 --- a/missing.c +++ b/missing.c @@ -140,12 +140,11 @@ int zend_update_static_property(zend_class_entry *scope, char *name, size_t name zval_copy_ctor(*property); } } else { - **property = *value; - zval_copy_ctor(*property); + REPLACE_ZVAL_VALUE(property, value, 1); } retval = SUCCESS; } - + zval_ptr_dtor(&value); EG(scope) = old_scope; return retval; @@ -190,7 +189,7 @@ void zend_fix_static_properties(zend_class_entry *ce, HashTable *static_members { zend_hash_copy(static_members, ce->static_members, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *)); zend_hash_destroy(ce->static_members); - zend_hash_init_ex(ce->static_members, 0, NULL, ZVAL_PTR_DTOR, 1, 0); + zend_hash_init_ex(ce->static_members, static_members->nNumOfElements, NULL, ZVAL_PTR_DTOR, 1, 0); } void zend_init_static_properties(zend_class_entry *ce, HashTable *static_members TSRMLS_DC)