]> granicus.if.org Git - php/commitdiff
Fix segfault in register_shutdown_function
authorSascha Schumann <sas@php.net>
Tue, 1 Apr 2003 10:02:29 +0000 (10:02 +0000)
committerSascha Schumann <sas@php.net>
Tue, 1 Apr 2003 10:02:29 +0000 (10:02 +0000)
ext/standard/basic_functions.c

index 927cc1282c70e1f3c8542e92a461b1807c4789bc..ae64d639829c1fa8059b91a76e7375a9fae179e3 100644 (file)
@@ -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);