Skip to content

Commit cc30524

Browse files
committed
Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance gives Segmentation fault)
1 parent 683b4f7 commit cc30524

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ PHP NEWS
1313
- DateTime:
1414
. Fixed Bug #62500 (Segfault in DateInterval class when extended). (Laruence)
1515

16+
- SPL:
17+
. Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
18+
gives Segmentation fault). (Laruence, Gustavo)
19+
1620
14 Jun 2012, PHP 5.3.14
1721

1822
- CLI SAPI:

ext/spl/spl_iterators.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,8 @@ static union _zend_function *spl_dual_it_get_method(zval **object_ptr, char *met
12871287
*object_ptr = intern->inner.zobject;
12881288
function_handler = Z_OBJ_HT_P(*object_ptr)->get_method(object_ptr, method, method_len TSRMLS_CC);
12891289
}
1290+
} else {
1291+
*object_ptr = intern->inner.zobject;
12901292
}
12911293
}
12921294
return function_handler;

0 commit comments

Comments
 (0)