mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Make type error messages more consistent
Closes GH-5092
This commit is contained in:
parent
72bd55902d
commit
ac0853eb26
389 changed files with 1680 additions and 1693 deletions
|
@ -1388,8 +1388,7 @@ ZEND_FUNCTION(set_error_handler)
|
|||
if (Z_TYPE_P(error_handler) != IS_NULL) { /* NULL == unset */
|
||||
if (!zend_is_callable(error_handler, 0, NULL)) {
|
||||
zend_string *error_handler_name = zend_get_callable_name(error_handler);
|
||||
zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
|
||||
get_active_function_name(), error_handler_name?ZSTR_VAL(error_handler_name):"unknown");
|
||||
zend_error(E_WARNING, "%s() expects argument #1 ($error_handler) to be a valid callback", get_active_function_name());
|
||||
zend_string_release_ex(error_handler_name, 0);
|
||||
return;
|
||||
}
|
||||
|
@ -1453,8 +1452,7 @@ ZEND_FUNCTION(set_exception_handler)
|
|||
if (Z_TYPE_P(exception_handler) != IS_NULL) { /* NULL == unset */
|
||||
if (!zend_is_callable(exception_handler, 0, NULL)) {
|
||||
zend_string *exception_handler_name = zend_get_callable_name(exception_handler);
|
||||
zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
|
||||
get_active_function_name(), exception_handler_name?ZSTR_VAL(exception_handler_name):"unknown");
|
||||
zend_error(E_WARNING, "%s() expects argument #1 ($exception_handler) to be a valid callback", get_active_function_name());
|
||||
zend_string_release_ex(exception_handler_name, 0);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue