Skip to content

Commit

Permalink
Use the canonical order of types in array|string ZPP error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Sep 4, 2020
1 parent e50cb32 commit e50449b
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Zend/zend_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -1223,8 +1223,8 @@ static zend_always_inline zval *zend_try_array_init(zval *zv)
_(Z_EXPECTED_DOUBLE_OR_NULL, "of type ?float") \
_(Z_EXPECTED_NUMBER, "of type int|float") \
_(Z_EXPECTED_NUMBER_OR_NULL, "of type int|float|null") \
_(Z_EXPECTED_STRING_OR_ARRAY, "of type string|array") \
_(Z_EXPECTED_STRING_OR_ARRAY_OR_NULL, "of type string|array|null") \
_(Z_EXPECTED_STRING_OR_ARRAY, "of type array|string") \
_(Z_EXPECTED_STRING_OR_ARRAY_OR_NULL, "of type array|string|null") \
_(Z_EXPECTED_STRING_OR_LONG, "of type string|int") \
_(Z_EXPECTED_STRING_OR_LONG_OR_NULL, "of type string|int|null") \
_(Z_EXPECTED_CLASS_NAME_OR_OBJECT, "a valid class name or object") \
Expand Down
2 changes: 1 addition & 1 deletion ext/pcre/tests/preg_replace_error1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ string(1) "a"

Arg value is /[a-zA-Z]/
string(1) "1"
preg_replace(): Argument #1 ($regex) must be of type string|array, stdClass given
preg_replace(): Argument #1 ($regex) must be of type array|string, stdClass given
2 changes: 1 addition & 1 deletion ext/pcre/tests/preg_replace_error2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ string(64) "this is a stringthis is a stringthis is a stringthis is a string"

Arg value is: Array
preg_replace(): Argument #1 ($regex) must be of type array when argument #2 ($replace) is an array, string given
preg_replace(): Argument #2 ($replace) must be of type string|array, stdClass given
preg_replace(): Argument #2 ($replace) must be of type array|string, stdClass given
Done
2 changes: 1 addition & 1 deletion ext/phar/tests/phar_extract.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ string(2) "hi"
string(3) "hi3"
string(3) "hi2"
bool(false)
Phar::extractTo(): Argument #2 ($files) must be of type string|array|null, stdClass given
Phar::extractTo(): Argument #2 ($files) must be of type array|string|null, stdClass given
Phar::extractTo(): Argument #1 ($pathto) must be a valid path, array given
Invalid argument, extraction path must be non-zero length
Unable to use path "%soops" for extraction, it is a file, must be a directory
Expand Down
2 changes: 1 addition & 1 deletion ext/soap/tests/fault_warning.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ echo get_class($fault);
?>
--EXPECT--
SoapFault::__construct(): Argument #1 ($faultcode) is not a valid fault code
SoapFault::__construct(): Argument #1 ($faultcode) must be of type string|array|null, stdClass given
SoapFault::__construct(): Argument #1 ($faultcode) must be of type array|string|null, stdClass given
SoapFault
SoapFault
SoapFault::__construct(): Argument #1 ($faultcode) is not a valid fault code
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/array/bug74345.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ try {
--EXPECT--
array_map(): Argument #2 ($array1) must be of type array, null given
array_map(): Argument #2 ($array1) must be of type array, null given
preg_replace_callback(): Argument #3 ($subject) must be of type string|array, stdClass given
preg_replace_callback(): Argument #3 ($subject) must be of type array|string, stdClass given
===DONE===
2 changes: 1 addition & 1 deletion ext/standard/tests/streams/bug61115.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ try {
}
?>
--EXPECT--
preg_replace(): Argument #2 ($replace) must be of type string|array, Closure given
preg_replace(): Argument #2 ($replace) must be of type array|string, Closure given
2 changes: 1 addition & 1 deletion ext/standard/tests/strings/join_variation1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ string(16) "element1element2"
-- Iteration 23 --
string(16) "element1element2"
-- Iteration 24 --
join(): Argument #1 ($glue) must be of type string|array, resource given
join(): Argument #1 ($glue) must be of type array|string, resource given
-- Iteration 25 --
string(16) "element1element2"
-- Iteration 26 --
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/strings/strtr_variation6.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ string(6) "012atm"
-- Iteration 16 --
string(6) "012ttm"
-- Iteration 17 --
strtr(): Argument #2 ($from) must be of type string|array, resource given
strtr(): Argument #2 ($from) must be of type array|string, resource given
-- Iteration 18 --
string(6) "012atm"
-- Iteration 19 --
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/strings/strtr_variation8.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ strtr(): Argument #2 ($from) must be of type array, string given
strtr(): Argument #2 ($from) must be of type array, string given

-- Iteration 17 --
strtr(): Argument #2 ($from) must be of type string|array, resource given
strtr(): Argument #2 ($from) must be of type array|string, resource given

-- Iteration 18 --
strtr(): Argument #2 ($from) must be of type array, string given
Expand Down

0 comments on commit e50449b

Please sign in to comment.