Skip to content

Commit e50449b

Browse files
committed
Use the canonical order of types in array|string ZPP error messages
1 parent e50cb32 commit e50449b

File tree

10 files changed

+11
-11
lines changed

10 files changed

+11
-11
lines changed

Zend/zend_API.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,8 +1223,8 @@ static zend_always_inline zval *zend_try_array_init(zval *zv)
12231223
_(Z_EXPECTED_DOUBLE_OR_NULL, "of type ?float") \
12241224
_(Z_EXPECTED_NUMBER, "of type int|float") \
12251225
_(Z_EXPECTED_NUMBER_OR_NULL, "of type int|float|null") \
1226-
_(Z_EXPECTED_STRING_OR_ARRAY, "of type string|array") \
1227-
_(Z_EXPECTED_STRING_OR_ARRAY_OR_NULL, "of type string|array|null") \
1226+
_(Z_EXPECTED_STRING_OR_ARRAY, "of type array|string") \
1227+
_(Z_EXPECTED_STRING_OR_ARRAY_OR_NULL, "of type array|string|null") \
12281228
_(Z_EXPECTED_STRING_OR_LONG, "of type string|int") \
12291229
_(Z_EXPECTED_STRING_OR_LONG_OR_NULL, "of type string|int|null") \
12301230
_(Z_EXPECTED_CLASS_NAME_OR_OBJECT, "a valid class name or object") \

ext/pcre/tests/preg_replace_error1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ string(1) "a"
5656

5757
Arg value is /[a-zA-Z]/
5858
string(1) "1"
59-
preg_replace(): Argument #1 ($regex) must be of type string|array, stdClass given
59+
preg_replace(): Argument #1 ($regex) must be of type array|string, stdClass given

ext/pcre/tests/preg_replace_error2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ string(64) "this is a stringthis is a stringthis is a stringthis is a string"
3636

3737
Arg value is: Array
3838
preg_replace(): Argument #1 ($regex) must be of type array when argument #2 ($replace) is an array, string given
39-
preg_replace(): Argument #2 ($replace) must be of type string|array, stdClass given
39+
preg_replace(): Argument #2 ($replace) must be of type array|string, stdClass given
4040
Done

ext/phar/tests/phar_extract.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ string(2) "hi"
141141
string(3) "hi3"
142142
string(3) "hi2"
143143
bool(false)
144-
Phar::extractTo(): Argument #2 ($files) must be of type string|array|null, stdClass given
144+
Phar::extractTo(): Argument #2 ($files) must be of type array|string|null, stdClass given
145145
Phar::extractTo(): Argument #1 ($pathto) must be a valid path, array given
146146
Invalid argument, extraction path must be non-zero length
147147
Unable to use path "%soops" for extraction, it is a file, must be a directory

ext/soap/tests/fault_warning.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ echo get_class($fault);
4040
?>
4141
--EXPECT--
4242
SoapFault::__construct(): Argument #1 ($faultcode) is not a valid fault code
43-
SoapFault::__construct(): Argument #1 ($faultcode) must be of type string|array|null, stdClass given
43+
SoapFault::__construct(): Argument #1 ($faultcode) must be of type array|string|null, stdClass given
4444
SoapFault
4545
SoapFault
4646
SoapFault::__construct(): Argument #1 ($faultcode) is not a valid fault code

ext/standard/tests/array/bug74345.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ try {
4242
--EXPECT--
4343
array_map(): Argument #2 ($array1) must be of type array, null given
4444
array_map(): Argument #2 ($array1) must be of type array, null given
45-
preg_replace_callback(): Argument #3 ($subject) must be of type string|array, stdClass given
45+
preg_replace_callback(): Argument #3 ($subject) must be of type array|string, stdClass given
4646
===DONE===

ext/standard/tests/streams/bug61115.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ try {
1414
}
1515
?>
1616
--EXPECT--
17-
preg_replace(): Argument #2 ($replace) must be of type string|array, Closure given
17+
preg_replace(): Argument #2 ($replace) must be of type array|string, Closure given

ext/standard/tests/strings/join_variation1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ string(16) "element1element2"
147147
-- Iteration 23 --
148148
string(16) "element1element2"
149149
-- Iteration 24 --
150-
join(): Argument #1 ($glue) must be of type string|array, resource given
150+
join(): Argument #1 ($glue) must be of type array|string, resource given
151151
-- Iteration 25 --
152152
string(16) "element1element2"
153153
-- Iteration 26 --

ext/standard/tests/strings/strtr_variation6.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ string(6) "012atm"
119119
-- Iteration 16 --
120120
string(6) "012ttm"
121121
-- Iteration 17 --
122-
strtr(): Argument #2 ($from) must be of type string|array, resource given
122+
strtr(): Argument #2 ($from) must be of type array|string, resource given
123123
-- Iteration 18 --
124124
string(6) "012atm"
125125
-- Iteration 19 --

ext/standard/tests/strings/strtr_variation8.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ strtr(): Argument #2 ($from) must be of type array, string given
136136
strtr(): Argument #2 ($from) must be of type array, string given
137137

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

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

0 commit comments

Comments
 (0)