mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed refcounting
This commit is contained in:
parent
ee0ecc83d5
commit
cce7d5a1ec
1 changed files with 2 additions and 1 deletions
|
@ -640,6 +640,7 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
|
|||
|
||||
switch (Z_TYPE(const_value)) {
|
||||
case IS_STRING:
|
||||
Z_ADDREF(const_value);
|
||||
ret = zend_symtable_update_current_key(Z_ARRVAL_P(p), Z_STR(const_value), HASH_UPDATE_KEY_IF_BEFORE);
|
||||
break;
|
||||
case IS_BOOL:
|
||||
|
@ -659,7 +660,7 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
|
|||
if (ret == SUCCESS) {
|
||||
zend_hash_move_forward(Z_ARRVAL_P(p));
|
||||
}
|
||||
zval_dtor(&const_value);
|
||||
zval_ptr_dtor(&const_value);
|
||||
}
|
||||
zend_hash_apply_with_argument(Z_ARRVAL_P(p), (apply_func_arg_t) zval_update_constant_inline_change, (void *) scope TSRMLS_CC);
|
||||
zend_hash_internal_pointer_reset(Z_ARRVAL_P(p));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue