mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
Throw TypeError for invalid callback
Matches behavior of zend_internal_type_error() if E_ERROR is passed to zend_wrong_callback_error().
This commit is contained in:
@@ -245,7 +245,7 @@ ZEND_API void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, cha
|
||||
zend_internal_type_error(ZEND_ARG_USES_STRICT_TYPES(), "%s%s%s() expects parameter %d to be a valid callback, %s",
|
||||
class_name, space, get_active_function_name(), num, error);
|
||||
} else if (severity == E_ERROR) {
|
||||
zend_throw_error(zend_ce_error, "%s%s%s() expects parameter %d to be a valid callback, %s",
|
||||
zend_throw_error(zend_ce_type_error, "%s%s%s() expects parameter %d to be a valid callback, %s",
|
||||
class_name, space, get_active_function_name(), num, error);
|
||||
} else {
|
||||
zend_error(severity, "%s%s%s() expects parameter %d to be a valid callback, %s",
|
||||
|
||||
Reference in New Issue
Block a user