refine the set_error_handler fix

This commit is contained in:
Stanislav Malyshev 2003-04-20 14:20:20 +00:00
parent faafbd6edd
commit ba02f60ee4

View File

@ -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;
}