diff options
| author | Aaron Piotrowski <aaron@trowski.com> | 2015-07-06 15:03:35 -0500 |
|---|---|---|
| committer | Aaron Piotrowski <aaron@trowski.com> | 2015-07-06 15:03:35 -0500 |
| commit | 1adf3df81e54d51e0ac2a6791f69aa995e04181a (patch) | |
| tree | 89882d56a3ec81e175a64261a4fb9a59717d24dc | |
| parent | 724051e3bd0b8618edd1dd3f29f27939efefff08 (diff) | |
| download | php-git-1adf3df81e54d51e0ac2a6791f69aa995e04181a.tar.gz | |
Throw TypeError for invalid callback
Matches behavior of zend_internal_type_error() if E_ERROR is passed to
zend_wrong_callback_error().
| -rw-r--r-- | Zend/zend_API.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 55d325c8fa..8b57457af2 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -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", |
