diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-05 10:07:07 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-11 11:32:20 +0100 |
commit | 513b76794bfa210edfdc5b478dffbcbb19747ad0 (patch) | |
tree | 6283beb92e0fd6a9da3e76c0f8ebe9649632f0aa /Zend/zend.h | |
parent | 87f8b1b7097ff58c3a535f5ce085f46960b37b78 (diff) | |
download | php-git-513b76794bfa210edfdc5b478dffbcbb19747ad0.tar.gz |
Make zpp failures always throw, independent of strict_types
Previously zend_parse_parameters (and FastZPP) would handle invalid
arguments depending on strict_types: With strict_types=1, a TypeError
is thrown, with strict_types=0 a warning is thrown and (usually) NULL
is returned. Additionally, some functions (constructors always and
other methods sometimes) opt-it to throwing regardless of strict_types.
This commit changes zpp to always generate a TypeError exception in
PHP 8.
Diffstat (limited to 'Zend/zend.h')
-rw-r--r-- | Zend/zend.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Zend/zend.h b/Zend/zend.h index 7313579e65..a55d45903e 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -303,8 +303,7 @@ extern ZEND_API void (*zend_post_shutdown_cb)(void); ZEND_API ZEND_COLD void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); ZEND_API ZEND_COLD void zend_type_error(const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 1, 2); -ZEND_API ZEND_COLD void zend_internal_type_error(zend_bool throw_exception, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); -ZEND_API ZEND_COLD void zend_internal_argument_count_error(zend_bool throw_exception, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); +ZEND_API ZEND_COLD void zend_argument_count_error(const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 1, 2); ZEND_COLD void zenderror(const char *error); |