File tree 1 file changed +14
-14
lines changed
1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -1033,23 +1033,23 @@ PHP_FUNCTION(implode)
1033
1033
Z_PARAM_ARRAY_HT_OR_NULL (pieces )
1034
1034
ZEND_PARSE_PARAMETERS_END ();
1035
1035
1036
- if (arg1_str != NULL && pieces == NULL ) {
1037
- zend_type_error (
1038
- "%s(): If argument #1 ($separator) is of type string, "
1039
- "argument #2 ($array) must be of type array, null given" ,
1040
- get_active_function_name ()
1041
- );
1042
- RETURN_THROWS ();
1043
- }
1044
-
1045
- if (pieces != NULL && arg1_str == NULL ) {
1046
- zend_argument_type_error (1 , "must be of type string, array given" );
1047
- RETURN_THROWS ();
1048
- }
1049
-
1050
1036
if (pieces == NULL ) {
1037
+ if (arg1_array == NULL ) {
1038
+ zend_type_error (
1039
+ "%s(): If argument #1 ($separator) is of type string, "
1040
+ "argument #2 ($array) must be of type array, null given" ,
1041
+ get_active_function_name ()
1042
+ );
1043
+ RETURN_THROWS ();
1044
+ }
1045
+
1051
1046
arg1_str = ZSTR_EMPTY_ALLOC ();
1052
1047
pieces = arg1_array ;
1048
+ } else {
1049
+ if (arg1_str == NULL ) {
1050
+ zend_argument_type_error (1 , "must be of type string, array given" );
1051
+ RETURN_THROWS ();
1052
+ }
1053
1053
}
1054
1054
1055
1055
php_implode (arg1_str , pieces , return_value );
You can’t perform that action at this time.
0 commit comments