Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/standard/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ PHP_FUNCTION(explode)
ZEND_PARSE_PARAMETERS_END();

if (ZSTR_LEN(delim) == 0) {
zend_argument_must_not_be_empty_error(1);
zend_argument_value_error(1, "must not be empty, use str_split() to split a string into characters");
RETURN_THROWS();
}

Expand Down
8 changes: 4 additions & 4 deletions ext/standard/tests/strings/explode.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ array (
4 => 'd',
)
d6bee42a771449205344c0938ad4f035
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
array(1) {
[0]=>
string(0) ""
Expand All @@ -79,7 +79,7 @@ array(1) {
[0]=>
string(0) ""
}
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
array(1) {
[0]=>
string(3) "acb"
Expand Down
24 changes: 12 additions & 12 deletions ext/standard/tests/strings/explode1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ var_dump( explode("b", $obj) );
--EXPECT--
*** Testing explode() for basic operations ***
-- Iteration 1 --
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
-- Iteration 2 --
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
-- Iteration 3 --
array(1) {
[0]=>
Expand Down Expand Up @@ -201,10 +201,10 @@ array(2) {
string(56) "234NULL23abcd00000TRUEFALSE-11.234444true-11.24%PHP%ZEND"
}
-- Iteration 7 --
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters
-- Iteration 8 --
array(2) {
[0]=>
Expand Down