Skip to content

Commit 649872f

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Fix param name in implode() error message
2 parents e1cb721 + ec82927 commit 649872f

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

ext/standard/string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ PHP_FUNCTION(implode)
10351035

10361036
if (pieces == NULL) {
10371037
if (arg1_array == NULL) {
1038-
zend_type_error("%s(): Argument #1 ($pieces) must be of type array, string given", get_active_function_name());
1038+
zend_type_error("%s(): Argument #1 ($array) must be of type array, string given", get_active_function_name());
10391039
RETURN_THROWS();
10401040
}
10411041

ext/standard/tests/strings/implode1.phpt

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 4 deletions
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)