We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc24121 commit 1705d3fCopy full SHA for 1705d3f
ext/standard/string.c
@@ -1026,16 +1026,16 @@ 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) {
1038
- ZEND_PARSE_PARAMETERS_START(1, 2)
+ if (ZEND_NUM_ARGS() >= 2) {
+ ZEND_PARSE_PARAMETERS_START(2, 2)
1039
Z_PARAM_STR(arg1_str)
1040
1041
0 commit comments