mirror of
https://github.com/php/php-src.git
synced 2024-12-03 14:54:40 +08:00
refine the set_error_handler fix
This commit is contained in:
parent
faafbd6edd
commit
ba02f60ee4
@ -968,7 +968,7 @@ ZEND_FUNCTION(set_error_handler)
|
||||
{
|
||||
zval **error_handler;
|
||||
zend_bool had_orig_error_handler=0;
|
||||
char *error_handler_name;
|
||||
char *error_handler_name = NULL;
|
||||
|
||||
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &error_handler)==FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
@ -976,7 +976,7 @@ ZEND_FUNCTION(set_error_handler)
|
||||
|
||||
if (!zend_is_callable(*error_handler, 0, &error_handler_name)) {
|
||||
zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
|
||||
get_active_function_name(TSRMLS_C), error_handler_name);
|
||||
get_active_function_name(TSRMLS_C), error_handler_name?error_handler_name:"unknown");
|
||||
efree(error_handler_name);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user