We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a9e26e commit a64ff0dCopy full SHA for a64ff0d
ext/standard/string.c
@@ -1026,15 +1026,13 @@ PHP_FUNCTION(implode)
1026
zend_string *arg1_str = NULL;
1027
zend_array *pieces = NULL;
1028
1029
- if (ZEND_NUM_ARGS() <= 1) {
+ if (ZEND_NUM_ARGS() == 1) {
1030
ZEND_PARSE_PARAMETERS_START(1, 1)
1031
Z_PARAM_ARRAY_HT(pieces)
1032
ZEND_PARSE_PARAMETERS_END();
1033
1034
arg1_str = ZSTR_EMPTY_ALLOC();
1035
- }
1036
-
1037
- if (ZEND_NUM_ARGS() >= 2) {
+ } else {
1038
ZEND_PARSE_PARAMETERS_START(2, 2)
1039
Z_PARAM_STR(arg1_str)
1040
0 commit comments