mirror of
https://github.com/php/php-src.git
synced 2025-08-20 17:34:35 +02:00
parent
752fec88ef
commit
dd33437eee
1 changed files with 2 additions and 2 deletions
|
@ -1655,8 +1655,8 @@ zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval
|
||||||
/* ->current must be initialized; rewind doesn't set it and valid
|
/* ->current must be initialized; rewind doesn't set it and valid
|
||||||
* doesn't check whether it's set */
|
* doesn't check whether it's set */
|
||||||
iterator->current = object;
|
iterator->current = object;
|
||||||
Z_SET_REFCOUNT_P(object, Z_REFCOUNT_P(object) + 2);
|
|
||||||
}
|
}
|
||||||
|
zval_add_ref(&object);
|
||||||
|
|
||||||
return (zend_object_iterator*)iterator;
|
return (zend_object_iterator*)iterator;
|
||||||
}
|
}
|
||||||
|
@ -1858,8 +1858,8 @@ zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zva
|
||||||
if (iterator->intern.data == NULL) {
|
if (iterator->intern.data == NULL) {
|
||||||
iterator->intern.data = object;
|
iterator->intern.data = object;
|
||||||
iterator->intern.funcs = &spl_filesystem_tree_it_funcs;
|
iterator->intern.funcs = &spl_filesystem_tree_it_funcs;
|
||||||
zval_add_ref(&object);
|
|
||||||
}
|
}
|
||||||
|
zval_add_ref(&object);
|
||||||
|
|
||||||
return (zend_object_iterator*)iterator;
|
return (zend_object_iterator*)iterator;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue