diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index baeae401ef2..82281c60a92 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -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; }