}
if (Z_TYPE(key) != IS_STRING) {
- zval_dtor(&key);
+ zval_ptr_dtor(&key);
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid key (must return a string)", ZSTR_VAL(ce->name));
return ZEND_HASH_APPLY_STOP;
}
}
if (Z_TYPE(key) != IS_STRING) {
- zval_dtor(&key);
+ zval_ptr_dtor(&key);
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid key (must return a string)", ZSTR_VAL(ce->name));
return ZEND_HASH_APPLY_STOP;
}
}
array_set_zval_key(Z_ARRVAL(array_copy), &key, val);
zval_ptr_dtor(val);
- zval_dtor(&key);
+ zval_ptr_dtor(&key);
} else {
add_next_index_zval(&array_copy, val);
}