com php-src: Throw TypeError for invalid callback: Zend/zend_ API.c
| From: | Aaron Piotrowski | Date: | Mon, 06 Jul 2015 20:03:35 +0000 |
| Subject: | com php-src: Throw TypeError for invalid callback: Zend/zend_ API.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87776@lists.php.net to get a copy of this message | ||
Commit: 1adf3df81e54d51e0ac2a6791f69aa995e04181a
Author: Aaron Piotrowski <aaron@trowski.com> Mon, 6 Jul 2015 15:03:35 -0500
Parents: 724051e3bd0b8618edd1dd3f29f27939efefff08
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1adf3df81e54d51e0ac2a6791f69aa995e04181a
Log:
Throw TypeError for invalid callback
Matches behavior of zend_internal_type_error() if E_ERROR is passed to
zend_wrong_callback_error().
Changed paths:
M Zend/zend_API.c
Diff:
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 55d325c..8b57457 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",