summaryrefslogtreecommitdiff
path: root/ext/standard/basic_functions.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-11-11 12:06:38 +0800
committerXinchen Hui <laruence@gmail.com>2015-11-11 12:06:38 +0800
commitc3260b66c9723d63c75f4f63aa2b9f52c6915d6f (patch)
tree9600f0a6b8fcc187c6144e3e53cc4686bde550bf /ext/standard/basic_functions.c
parentd6c527830e57c85356916e2efc2e6f120d493051 (diff)
downloadphp-git-c3260b66c9723d63c75f4f63aa2b9f52c6915d6f.tar.gz
Revert "Fixed bug #70249 (Segmentation fault while running PHPUnit tests on phpBB 3.2-dev)"
This reverts commit d6c527830e57c85356916e2efc2e6f120d493051.
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r--ext/standard/basic_functions.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 1c5f3fe988..8da45c4287 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -5002,16 +5002,9 @@ PHPAPI void php_call_shutdown_functions(void) /* {{{ */
{
if (BG(user_shutdown_function_names)) {
zend_try {
- zval *entry;
- for (zend_hash_internal_pointer_reset(BG(user_shutdown_function_names));
- zend_hash_has_more_elements(BG(user_shutdown_function_names)) == SUCCESS;
- zend_hash_move_forward(BG(user_shutdown_function_names))) {
- if ((entry = zend_hash_get_current_data(BG(user_shutdown_function_names))) == NULL) {
- continue;
- }
- user_shutdown_function_call(entry);
- }
- } zend_end_try();
+ zend_hash_apply(BG(user_shutdown_function_names), user_shutdown_function_call);
+ }
+ zend_end_try();
php_free_shutdown_functions();
}
}