]> granicus.if.org Git - php/commitdiff
- Make iterator_to_array() accept Traversable
authorMarcus Boerger <helly@php.net>
Thu, 31 Mar 2005 21:49:47 +0000 (21:49 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 31 Mar 2005 21:49:47 +0000 (21:49 +0000)
ext/spl/spl_iterators.c

index e9858ea774ddd347c23c88da19a4c9ba5ba0055d..879d357374b7a807ab5bb6431d45baa8292bada4 100755 (executable)
@@ -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;
        }