We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d7d812 commit 6f5a636Copy full SHA for 6f5a636
ext/spl/spl_iterators.c
@@ -3112,7 +3112,10 @@ zval *spl_iterator_zip_get_current_data(zend_object_iterator *iter)
3112
data = zend_hash_get_current_data_ex(current->array, ¤t->hash_position_or_tag);
3113
}
3114
if (UNEXPECTED(data == NULL)) {
3115
- // TODO: cleanup the work we already did (and make sure no memory is uninit)
+ for (uint32_t j = 0; j < i; j++) {
3116
+ zval_ptr_dtor(&array->arPacked[j]);
3117
+ ZVAL_UNDEF(&array->arPacked[j]);
3118
+ }
3119
return NULL;
3120
3121
ZVAL_COPY(&array->arPacked[i], data);
0 commit comments