From 530917b463add59b8e4ca7e5ff3f32e9a99a1f78 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 31 Mar 2005 21:49:47 +0000 Subject: [PATCH] - Make iterator_to_array() accept Traversable --- ext/spl/spl_iterators.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index e9858ea774..879d357374 100755 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -1823,7 +1823,7 @@ static zend_function_entry spl_funcs_AppendIterator[] = { {NULL, NULL, NULL} }; -/* {{{ array iterator_to_array(IteratorAggregate it) +/* {{{ array iterator_to_array(Traversable it) Copy the iterator into an array */ PHP_FUNCTION(iterator_to_array) { @@ -1834,7 +1834,7 @@ PHP_FUNCTION(iterator_to_array) ulong int_key; int key_type; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, zend_ce_aggregate) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, zend_ce_traversable) == FAILURE) { RETURN_FALSE; } -- 2.50.1