From: Sascha Schumann Date: Tue, 1 Apr 2003 10:02:29 +0000 (+0000) Subject: Fix segfault in register_shutdown_function X-Git-Tag: RELEASE_0_5~235 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc39646730c1f3621de276c115270879eccaa2a0;p=php Fix segfault in register_shutdown_function --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 927cc1282c..ae64d63982 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2171,6 +2171,7 @@ PHP_FUNCTION(register_shutdown_function) if (zend_get_parameters_array(ht, shutdown_function_entry.arg_count, shutdown_function_entry.arguments) == FAILURE) { RETURN_FALSE; } + convert_to_string(shutdown_function_entry.arguments[0]); if (!BG(user_shutdown_function_names)) { ALLOC_HASHTABLE(BG(user_shutdown_function_names)); zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0);