Skip to content

Commit b1ce1d1

Browse files
committedAug 24, 2023
Fix param name in implode() error message
1 parent ba07a0b commit b1ce1d1

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed
 

‎ext/standard/string.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ PHP_FUNCTION(implode)
12381238

12391239
if (pieces == NULL) {
12401240
if (arg1_array == NULL) {
1241-
zend_type_error("%s(): Argument #1 ($pieces) must be of type array, string given", get_active_function_name());
1241+
zend_type_error("%s(): Argument #1 ($array) must be of type array, string given", get_active_function_name());
12421242
RETURN_THROWS();
12431243
}
12441244

‎ext/standard/tests/strings/implode1.phpt

+3-3
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ string(35) "2000-639010PHP000 0string%0with%0...%0"
236236
string(43) "2\00\0-639\01\0PHP\0\0\0 \0string%0with%0...%0"
237237

238238
*** Testing implode() on empty string ***
239-
implode(): Argument #1 ($pieces) must be of type array, string given
239+
implode(): Argument #1 ($array) must be of type array, string given
240240

241241
*** Testing implode() on sub-arrays ***
242242

@@ -266,9 +266,9 @@ array(2) {
266266
string(%d) "Resource id #%d::Resource id #%d"
267267

268268
*** Testing error conditions ***
269-
implode(): Argument #1 ($pieces) must be of type array, string given
269+
implode(): Argument #1 ($array) must be of type array, string given
270270
implode(): Argument #2 ($array) must be of type ?array, int given
271-
implode(): Argument #1 ($pieces) must be of type array, string given
271+
implode(): Argument #1 ($array) must be of type array, string given
272272
string(0) ""
273273
implode(): Argument #2 ($array) must be of type ?array, string given
274274

‎ext/standard/tests/strings/join_error.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ echo "Done\n";
2020
*** Testing join() : error conditions ***
2121

2222
-- Testing join() with less than expected no. of arguments --
23-
join(): Argument #1 ($pieces) must be of type array, string given
23+
join(): Argument #1 ($array) must be of type array, string given
2424
Done

‎ext/standard/tests/strings/join_variation2.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,13 @@ join(): Argument #2 ($array) must be of type ?array, string given
138138
-- Iteration 18 --
139139
join(): Argument #2 ($array) must be of type ?array, string given
140140
-- Iteration 19 --
141-
join(): Argument #1 ($pieces) must be of type array, string given
141+
join(): Argument #1 ($array) must be of type array, string given
142142
-- Iteration 20 --
143-
join(): Argument #1 ($pieces) must be of type array, string given
143+
join(): Argument #1 ($array) must be of type array, string given
144144
-- Iteration 21 --
145145
join(): Argument #2 ($array) must be of type ?array, resource given
146146
-- Iteration 22 --
147-
join(): Argument #1 ($pieces) must be of type array, string given
147+
join(): Argument #1 ($array) must be of type array, string given
148148
-- Iteration 23 --
149-
join(): Argument #1 ($pieces) must be of type array, string given
149+
join(): Argument #1 ($array) must be of type array, string given
150150
Done

0 commit comments

Comments
 (0)