From 591821887269dba6a34f4d1696ce641ab4b7d44b Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 18 Sep 2000 13:43:20 +0000 Subject: [PATCH] Made get_included_files() work again, in somewhat different way --- Zend/zend_builtin_functions.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 7c0941186a..86c1a7611b 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -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); */ } /* }}} */ -- 2.40.0