@@ -208,8 +208,8 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int num_
208
208
class_name , \
209
209
class_name [0 ] ? "::" : "" , \
210
210
ZSTR_VAL (active_function -> common .function_name ),
211
- min_num_args == max_num_args ? "exactly" : num_args < min_num_args ? "at least" : "at most " ,
212
- num_args < min_num_args ? min_num_args : max_num_args ,
211
+ min_num_args == max_num_args ? "exactly" : "at least" ,
212
+ min_num_args ,
213
213
(num_args < min_num_args ? min_num_args : max_num_args ) == 1 ? "" : "s" ,
214
214
num_args );
215
215
}
@@ -738,7 +738,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
738
738
/* 'Z' iz not supported anymore and should be replaced with 'z' */
739
739
ZEND_ASSERT (c != 'Z' );
740
740
default :
741
- return "unknown" ;
741
+ return NULL ;
742
742
}
743
743
744
744
* spec = spec_walk ;
@@ -872,7 +872,7 @@ static int zend_parse_va_args(int num_args, const char *type_spec, va_list *va,
872
872
max_num_args = -1 ;
873
873
}
874
874
875
- if (num_args < min_num_args || ( num_args > max_num_args && max_num_args >= 0 ) ) {
875
+ if (num_args < min_num_args ) {
876
876
if (!(flags & ZEND_PARSE_PARAMS_QUIET )) {
877
877
zend_function * active_function = EG (current_execute_data )-> func ;
878
878
const char * class_name = active_function -> common .scope ? ZSTR_VAL (active_function -> common .scope -> name ) : "" ;
@@ -881,8 +881,8 @@ static int zend_parse_va_args(int num_args, const char *type_spec, va_list *va,
881
881
class_name ,
882
882
class_name [0 ] ? "::" : "" ,
883
883
ZSTR_VAL (active_function -> common .function_name ),
884
- min_num_args == max_num_args ? "exactly" : num_args < min_num_args ? "at least" : "at most " ,
885
- num_args < min_num_args ? min_num_args : max_num_args ,
884
+ min_num_args == max_num_args ? "exactly" : "at least" ,
885
+ min_num_args ,
886
886
(num_args < min_num_args ? min_num_args : max_num_args ) == 1 ? "" : "s" ,
887
887
num_args );
888
888
}
0 commit comments