Skip to content

Commit 66c7b8f

Browse files
committed
Address review feedback
1 parent 49068ac commit 66c7b8f

5 files changed

Lines changed: 17 additions & 21 deletions

File tree

NEWS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,6 @@ PHP NEWS
224224
(Weilin Du)
225225
. getenv() and putenv() now raises a ValueError when the first argument
226226
contains null bytes. (Weilin Du)
227-
. Improved explode() ValueError message when $separator is empty; suggests
228-
str_split() or mb_str_split(). (diegoasales)
229227
. parse_str() now raises a ValueError when the $string argument contains
230228
null bytes. (Weilin Du)
231229
. proc_open() now raises a ValueError when the $cwd argument contains

UPGRADING

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,6 @@ PHP 8.6 UPGRADE NOTES
281281
constants).
282282

283283
- Standard:
284-
. explode() ValueError message when $separator is empty now suggests
285-
str_split() or mb_str_split().
286284
. ini_get_all() now includes a "builtin_default_value" element for each
287285
directive when $details is true. It holds the built-in default value of
288286
the directive (or null if it has none), independent of values set in

ext/standard/string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ PHP_FUNCTION(explode)
914914
ZEND_PARSE_PARAMETERS_END();
915915

916916
if (ZSTR_LEN(delim) == 0) {
917-
zend_argument_value_error(1, "must not be empty. Use str_split() or mb_str_split() to split a string into characters");
917+
zend_argument_value_error(1, "must not be empty, use str_split() to split a string into characters");
918918
RETURN_THROWS();
919919
}
920920

ext/standard/tests/strings/explode.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ array (
6262
4 => 'd',
6363
)
6464
d6bee42a771449205344c0938ad4f035
65-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
66-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
67-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
65+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
66+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
67+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
6868
array(1) {
6969
[0]=>
7070
string(0) ""
@@ -79,7 +79,7 @@ array(1) {
7979
[0]=>
8080
string(0) ""
8181
}
82-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
82+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
8383
array(1) {
8484
[0]=>
8585
string(3) "acb"

ext/standard/tests/strings/explode1.phpt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ var_dump( explode("b", $obj) );
9191
--EXPECT--
9292
*** Testing explode() for basic operations ***
9393
-- Iteration 1 --
94-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
95-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
96-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
97-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
94+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
95+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
96+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
97+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
9898
-- Iteration 2 --
99-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
100-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
101-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
102-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
99+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
100+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
101+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
102+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
103103
-- Iteration 3 --
104104
array(1) {
105105
[0]=>
@@ -201,10 +201,10 @@ array(2) {
201201
string(56) "234NULL23abcd00000TRUEFALSE-11.234444true-11.24%PHP%ZEND"
202202
}
203203
-- Iteration 7 --
204-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
205-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
206-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
207-
explode(): Argument #1 ($separator) must not be empty. Use str_split() or mb_str_split() to split a string into characters
204+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
205+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
206+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
207+
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
208208
-- Iteration 8 --
209209
array(2) {
210210
[0]=>

0 commit comments

Comments
 (0)