diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-06-30 15:04:54 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-07-06 12:42:02 +0200 |
commit | b18b2c8fe587321384c9423470cf97d8040b32e2 (patch) | |
tree | ef2ffc57c3b54ada2414bca33c5dd07988c5ab9e /Zend/zend_API.c | |
parent | a4b253c40bd2329e66ce12a35b5cabf9c244e652 (diff) | |
download | php-git-b18b2c8fe587321384c9423470cf97d8040b32e2.tar.gz |
Add string or object ZPP macros
Closes GH-5788
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 14075847ad..4aa0103ae5 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -252,6 +252,26 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_null_error(i } /* }}} */ +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_error(int num, const char *name, zval *arg) /* {{{ */ +{ + if (EG(exception)) { + return; + } + + zend_argument_type_error(num, "must be of type %s|string, %s given", name, zend_zval_type_name(arg)); +} +/* }}} */ + +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_or_null_error(int num, const char *name, zval *arg) /* {{{ */ +{ + if (EG(exception)) { + return; + } + + zend_argument_type_error(num, "must be of type %s|string|null, %s given", name, zend_zval_type_name(arg)); +} +/* }}} */ + ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int num, char *error) /* {{{ */ { if (EG(exception)) { |