mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-07 09:17:29 +00: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:
1 parent
724051e3bd
commit
1adf3df81e
1 file changed
+1
-1
+1
-1
@@ -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