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 72c6102 commit aa66f46Copy full SHA for aa66f46
ext/standard/string.c
@@ -1033,9 +1033,14 @@ PHP_FUNCTION(implode)
1033
Z_PARAM_ARRAY_HT_OR_NULL(pieces)
1034
ZEND_PARSE_PARAMETERS_END();
1035
1036
+ if (arg1_str != NULL && pieces == NULL) {
1037
+ zend_type_error("%s(): Argument #2 ($array) must be of type array, null given", get_active_function_name());
1038
+ RETURN_THROWS();
1039
+ }
1040
+
1041
if (pieces == NULL) {
1042
if (arg1_array == NULL) {
- zend_type_error("%s(): Argument #1 ($array) must be of type array, null given", get_active_function_name());
1043
+ zend_type_error("%s(): Argument #1 ($array) must be of type array, string given", get_active_function_name());
1044
RETURN_THROWS();
1045
}
1046
0 commit comments