Home  |  Linux  | Mysql  | PHP  | XML
From:Jan Schneider Date:Thu Apr  3 07:42:10 2003
Subject:Re: cvs: php4 /ext/standard basic_functions.c
Sascha Schumann wrote:
> sas		Tue Apr  1 05:02:29 2003 EDT
> 
>   Modified files:              
>     /php4/ext/standard	basic_functions.c 
>   Log:
>   Fix segfault in register_shutdown_function
>   
>   
> Index: php4/ext/standard/basic_functions.c
> diff -u php4/ext/standard/basic_functions.c:1.599 php4/ext/standard/basic_functions.c:1.600
> --- php4/ext/standard/basic_functions.c:1.599	Tue Apr  1 00:30:32 2003
> +++ php4/ext/standard/basic_functions.c	Tue Apr  1 05:02:29 2003
> @@ -17,7 +17,7 @@
>     +----------------------------------------------------------------------+
>   */
>  
> -/* $Id: basic_functions.c,v 1.599 2003/04/01 05:30:32 sebastian Exp $ */
> +/* $Id: basic_functions.c,v 1.600 2003/04/01 10:02:29 sas Exp $ */
>  
>  #include "php.h"
>  #include "php_streams.h"
> @@ -2171,6 +2171,7 @@
>  	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);
> 
> 

I didn't try HEAD yet, but at least in PHP_4_3 it broke registration of 
object methods a la:

register_shutdown_function(array($my_object, 'method_name'));

Jan.


Navigate in group php.dev at sever news.php.net
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants