]> granicus.if.org Git - php/commitdiff
Made get_included_files() work again, in somewhat different way
authorStanislav Malyshev <stas@php.net>
Mon, 18 Sep 2000 13:43:20 +0000 (13:43 +0000)
committerStanislav Malyshev <stas@php.net>
Mon, 18 Sep 2000 13:43:20 +0000 (13:43 +0000)
Zend/zend_builtin_functions.c

index 7c0941186aacab28226e1aad8c9eed67dfa89d83..86c1a7611b5b42b52836ac203b0dbead88a5f162 100644 (file)
@@ -716,12 +716,19 @@ static int copy_import_use_file(zend_file_handle *fh, zval *array)
    Returns an array with the file names that were include_once()'d */
 ZEND_FUNCTION(get_included_files)
 {
+       char *entry;
        if (ZEND_NUM_ARGS() != 0) {
                ZEND_WRONG_PARAM_COUNT();
        }
 
        array_init(return_value);
-       zend_hash_apply_with_argument(&EG(included_files), (apply_func_arg_t) copy_import_use_file, return_value);
+       zend_hash_internal_pointer_reset(&EG(included_files));
+       while(zend_hash_get_current_key(&EG(included_files), &entry,NULL) == HASH_KEY_IS_STRING) {
+               add_next_index_string(return_value,entry,0);
+               zend_hash_move_forward(&EG(included_files));
+       }
+
+       /*      zend_hash_apply_with_argument(&EG(included_files), (apply_func_arg_t) copy_import_use_file, return_value); */
 }
 /* }}} */