Skip to content

Commit 533669f

Browse files
committed
Remove redundant addref+dtor
1 parent dad5110 commit 533669f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Zend/zend_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */
15781578
result = zend_symtable_update(ht, Z_STR_P(key), value);
15791579
break;
15801580
case IS_NULL:
1581-
result = zend_symtable_update(ht, ZSTR_EMPTY_ALLOC(), value);
1581+
result = zend_hash_update(ht, ZSTR_EMPTY_ALLOC(), value);
15821582
break;
15831583
case IS_RESOURCE:
15841584
zend_error(E_WARNING, "Resource ID#%d used as offset, casting to integer (%d)", Z_RES_HANDLE_P(key), Z_RES_HANDLE_P(key));

ext/spl/spl_iterators.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2360,9 +2360,7 @@ static inline void spl_caching_it_next(spl_dual_it_object *intern)
23602360
zval *data = &intern->current.data;
23612361

23622362
ZVAL_DEREF(data);
2363-
Z_TRY_ADDREF_P(data);
23642363
array_set_zval_key(Z_ARRVAL(intern->u.caching.zcache), key, data);
2365-
zval_ptr_dtor(data);
23662364
}
23672365
/* Recursion ? */
23682366
if (intern->dit_type == DIT_RecursiveCachingIterator) {

0 commit comments

Comments
 (0)