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;
{
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)