Skip to content

Commit a65ec4c

Browse files
committed
Change type of max_num_args to uint32_t
Closes GH-5885.
1 parent e29ee65 commit a65ec4c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Zend/zend_API.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num
12561256
#define ZEND_PARSE_PARAMETERS_START_EX(flags, min_num_args, max_num_args) do { \
12571257
const int _flags = (flags); \
12581258
uint32_t _min_num_args = (min_num_args); \
1259-
int _max_num_args = (max_num_args); /* TODO uint32_t */ \
1259+
uint32_t _max_num_args = (uint32_t) (max_num_args); \
12601260
uint32_t _num_args = EX_NUM_ARGS(); \
12611261
uint32_t _i = 0; \
12621262
zval *_real_arg, *_arg = NULL; \
@@ -1274,8 +1274,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num
12741274
\
12751275
do { \
12761276
if (UNEXPECTED(_num_args < _min_num_args) || \
1277-
(UNEXPECTED(_num_args > _max_num_args) && \
1278-
EXPECTED(_max_num_args >= 0))) { \
1277+
UNEXPECTED(_num_args > _max_num_args)) { \
12791278
if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \
12801279
zend_wrong_parameters_count_error(_min_num_args, _max_num_args); \
12811280
} \

0 commit comments

Comments
 (0)