@@ -1231,6 +1231,7 @@ typedef enum _zend_expected_type {
1231
1231
1232
1232
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_none_error (void );
1233
1233
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error (int min_num_args , int max_num_args );
1234
+ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_error (int error_code , int num , char * name , zend_expected_type expected_type , zval * arg );
1234
1235
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error (int num , zend_expected_type expected_type , zval * arg );
1235
1236
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error (int num , const char * name , zval * arg );
1236
1237
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_null_error (int num , const char * name , zval * arg );
@@ -1296,19 +1297,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num
1296
1297
} while (0); \
1297
1298
if (UNEXPECTED(_error_code != ZPP_ERROR_OK)) { \
1298
1299
if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \
1299
- if (_error_code == ZPP_ERROR_WRONG_CALLBACK) { \
1300
- zend_wrong_callback_error(_i, _error); \
1301
- } else if (_error_code == ZPP_ERROR_WRONG_CLASS) { \
1302
- zend_wrong_parameter_class_error(_i, _error, _arg); \
1303
- } else if (_error_code == ZPP_ERROR_WRONG_CLASS_OR_NULL) { \
1304
- zend_wrong_parameter_class_or_null_error(_i, _error, _arg); \
1305
- } else if (_error_code == ZPP_ERROR_WRONG_ARG) { \
1306
- zend_wrong_parameter_type_error(_i, _expected_type, _arg); \
1307
- } else if (_error_code == ZPP_ERROR_WRONG_STRING_OR_CLASS) { \
1308
- zend_wrong_parameter_string_or_class_error(_i, _error, _arg); \
1309
- } else if (_error_code == ZPP_ERROR_WRONG_STRING_OR_CLASS_OR_NULL) { \
1310
- zend_wrong_parameter_string_or_class_or_null_error(_i, _error, _arg); \
1311
- } \
1300
+ zend_wrong_parameter_error(_error_code, _i, _error, _expected_type, _arg); \
1312
1301
} \
1313
1302
failure; \
1314
1303
} \
0 commit comments