Skip to content

Commit 960318e

Browse files
committed
Change argument error message format
Closes GH-5211
1 parent c7094d8 commit 960318e

File tree

357 files changed

+1168
-1158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

357 files changed

+1168
-1158
lines changed

Zend/tests/008.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var_dump(constant("test const"));
2525
echo "Done\n";
2626
?>
2727
--EXPECTF--
28-
TypeError: define() expects argument #1 ($constant_name) to be of type string, array given
28+
TypeError: define(): Argument #1 ($constant_name) must be of type string, array given
2929

3030
Notice: Constant TRUE already defined in %s on line %d
3131
bool(false)

Zend/tests/009.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ string(3) "foo"
4646

4747
Warning: get_class() called without object from outside a class in %s on line %d
4848
bool(false)
49-
get_class() expects argument #1 ($object) to be of type object, string given
49+
get_class(): Argument #1 ($object) must be of type object, string given
5050
string(3) "foo"
5151
string(4) "foo2"
52-
get_class() expects argument #1 ($object) to be of type object, null given
52+
get_class(): Argument #1 ($object) must be of type object, null given
5353
Done

Zend/tests/arrow_functions/006.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ try {
3232
--EXPECTF--
3333
int(2)
3434
int(10)
35-
{closure}() expects argument #1 ($x) to be of type int, string given, called in %s on line %d
35+
{closure}(): Argument #1 ($x) must be of type int, string given, called in %s on line %d
3636
array(3) {
3737
[0]=>
3838
int(20)
@@ -41,4 +41,4 @@ array(3) {
4141
[2]=>
4242
int(30)
4343
}
44-
{closure}() expects argument #2 ($args) to be of type ?int, string given, called in %s on line %d
44+
{closure}(): Argument #2 ($args) must be of type ?int, string given, called in %s on line %d

Zend/tests/bug31720.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ try {
1212
?>
1313
--EXPECTF--
1414
Warning: Undefined variable: nonesuchvar in %s on line %d
15-
array_walk() expects argument #2 ($funcname) to be a valid callback, first array member is not a valid class name or object
15+
array_walk(): Argument #2 ($funcname) must be a valid callback, first array member is not a valid class name or object

Zend/tests/bug39003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test($obj);
2020
echo "Done\n";
2121
?>
2222
--EXPECTF--
23-
Fatal error: Uncaught TypeError: test() expects argument #1 ($object) to be of type OtherClassName, ClassName given, called in %s on line %d and defined in %s:%d
23+
Fatal error: Uncaught TypeError: test(): Argument #1 ($object) must be of type OtherClassName, ClassName given, called in %s:%d
2424
Stack trace:
2525
#0 %s(%d): test(Object(ClassName))
2626
#1 {main}

Zend/tests/bug42802.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ok
3737
ok
3838
ok
3939

40-
Fatal error: Uncaught TypeError: foo\test5() expects argument #1 ($bar) to be of type bar, foo\bar given, called in %s on line %d and defined in %s:%d
40+
Fatal error: Uncaught TypeError: foo\test5(): Argument #1 ($bar) must be of type bar, foo\bar given, called in %s:%d
4141
Stack trace:
4242
#0 %s(%d): foo\test5(Object(foo\bar))
4343
#1 {main}

Zend/tests/bug43332_1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $foo = new foo;
1212
$foo->bar($foo); // Ok!
1313
$foo->bar(new \stdclass); // Error, ok!
1414
--EXPECTF--
15-
Fatal error: Uncaught TypeError: foobar\foo::bar() expects argument #1 ($a) to be of type foobar\foo, stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5
15+
Fatal error: Uncaught TypeError: foobar\foo::bar(): Argument #1 ($a) must be of type foobar\foo, stdClass given, called in %s:%d
1616
Stack trace:
1717
#0 %s(%d): foobar\foo->bar(Object(stdClass))
1818
#1 {main}

Zend/tests/bug45186.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ string(1) "y"
5454
ok
5555
__callstatic:
5656
string(3) "www"
57-
call_user_func() expects argument #1 ($function) to be a valid callback, cannot access self:: when no class scope is active
57+
call_user_func(): Argument #1 ($function) must be a valid callback, cannot access self:: when no class scope is active

Zend/tests/bug45186_2.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ string(1) "y"
5252
__call:
5353
string(1) "y"
5454
ok
55-
call_user_func() expects argument #1 ($function) to be a valid callback, class 'bar' does not have a method 'www'
56-
call_user_func() expects argument #1 ($function) to be a valid callback, cannot access self:: when no class scope is active
55+
call_user_func(): Argument #1 ($function) must be a valid callback, class 'bar' does not have a method 'www'
56+
call_user_func(): Argument #1 ($function) must be a valid callback, cannot access self:: when no class scope is active

Zend/tests/bug48770_2.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ $c->func('This should work!');
5858
--EXPECT--
5959
string(27) "A::func2: This should work!"
6060
string(27) "A::func3: This should work!"
61-
call_user_func_array() expects argument #1 ($function) to be a valid callback, cannot access private method A::func22()
62-
call_user_func_array() expects argument #1 ($function) to be a valid callback, class 'A' does not have a method 'inexistent'
61+
call_user_func_array(): Argument #1 ($function) must be a valid callback, cannot access private method A::func22()
62+
call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'A' does not have a method 'inexistent'

Zend/tests/bug48770_3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ $c->func('This should work!');
5252
--EXPECT--
5353
string(27) "B::func2: This should work!"
5454
string(27) "B::func3: This should work!"
55-
call_user_func_array() expects argument #1 ($function) to be a valid callback, class 'B' does not have a method 'inexistent'
55+
call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'B' does not have a method 'inexistent'

Zend/tests/bug61273.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ $args = array_fill(0, 64 * 1024 - 64, 0);
1111
call_user_func_array(function(&$a) {}, $args);
1212
echo strval("okey");
1313
--EXPECTF--
14-
Warning: {closure}() expects argument #1 ($a) to be passed by reference, value given in %s on line %d
14+
Warning: {closure}(): Argument #1 ($a) must be passed by reference, value given in %s on line %d
1515
okey

Zend/tests/bug68446.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ array(1) {
3232
int(1)
3333
}
3434

35-
Fatal error: Uncaught TypeError: a() expects argument #1 ($a) to be of type array, null given, called in %s on line %d and defined in %s:%d
35+
Fatal error: Uncaught TypeError: a(): Argument #1 ($a) must be of type array, null given, called in %s:%d
3636
Stack trace:
3737
#0 %s(%d): a(NULL)
3838
#1 {main}

Zend/tests/bug70895.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ try {
2020
}
2121
?>
2222
--EXPECT--
23-
array_map() expects argument #1 ($callback) to be a valid callback, function '%n' not found or invalid function name
24-
array_map() expects argument #1 ($callback) to be a valid callback, function '%n %i' not found or invalid function name
25-
array_map() expects argument #1 ($callback) to be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name
23+
array_map(): Argument #1 ($callback) must be a valid callback, function '%n' not found or invalid function name
24+
array_map(): Argument #1 ($callback) must be a valid callback, function '%n %i' not found or invalid function name
25+
array_map(): Argument #1 ($callback) must be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name

Zend/tests/bug70898.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ try {
1313
}
1414
?>
1515
--EXPECT--
16-
array_map() expects argument #1 ($callback) to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name
16+
array_map(): Argument #1 ($callback) must be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name

Zend/tests/bug72598.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ new class {
1717
};
1818
?>
1919
--EXPECTF--
20-
Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
20+
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
2121
object(class@anonymous)#1 (0) {
2222
}
2323

24-
Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
24+
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
2525
object(class@anonymous)#1 (0) {
2626
}

Zend/tests/bug72598_2.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ new class {
2020
};
2121
?>
2222
--EXPECTF--
23-
Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
23+
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
2424
int(0)
2525

26-
Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
26+
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
2727
int(0)

Zend/tests/bug73954.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ takes_int(log(tan(3.14)));
1616
float(NAN)
1717
bool(true)
1818

19-
Fatal error: Uncaught TypeError: takes_int() expects argument #1 ($int) to be of type int, float given, called in %s on line %d and defined in %s:%d
19+
Fatal error: Uncaught TypeError: takes_int(): Argument #1 ($int) must be of type int, float given, called in %s:%d
2020
Stack trace:
2121
#0 %s(9): takes_int(NAN)
2222
#1 {main}

Zend/tests/bug74164.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set_error_handler(function ($type, $msg) {
1212
call_user_func(function (array &$ref) {var_dump("xxx");}, 'not_an_array_variable');
1313
?>
1414
--EXPECTF--
15-
Fatal error: Uncaught Exception: Foo\{closure}() expects argument #1 ($ref) to be passed by reference, value given in %s:%d
15+
Fatal error: Uncaught Exception: Foo\{closure}(): Argument #1 ($ref) must be passed by reference, value given in %s:%d
1616
Stack trace:
1717
#0 [internal function]: Foo\{closure}(%s)
1818
#1 %sbug74164.php(%d): call_user_func(%s)

Zend/tests/call_user_func_001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ namespace testing {
3737
?>
3838
--EXPECT--
3939
string(6) "foobar"
40-
call_user_func() expects argument #1 ($function) to be a valid callback, cannot access private method testing\foo::priv()
41-
call_user_func() expects argument #1 ($function) to be a valid callback, cannot access protected method testing\foo::prot()
40+
call_user_func(): Argument #1 ($function) must be a valid callback, cannot access private method testing\foo::priv()
41+
call_user_func(): Argument #1 ($function) must be a valid callback, cannot access protected method testing\foo::prot()

Zend/tests/call_user_func_002.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ try {
3131
?>
3232
--EXPECTF--
3333
string(3) "foo"
34-
call_user_func() expects argument #1 ($function) to be a valid callback, class 'foo' not found
35-
call_user_func() expects argument #1 ($function) to be a valid callback, class '' not found
34+
call_user_func(): Argument #1 ($function) must be a valid callback, class 'foo' not found
35+
call_user_func(): Argument #1 ($function) must be a valid callback, class '' not found
3636

3737
Warning: Undefined variable: foo in %s on line %d
38-
call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object
38+
call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object
3939

4040
Warning: Undefined variable: foo in %s on line %d
41-
call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object
41+
call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object

Zend/tests/call_user_func_006.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ var_dump($y);
2121

2222
?>
2323
--EXPECTF--
24-
Warning: Foo\bar() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
24+
Warning: Foo\bar(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
2525
int(42)
2626

27-
Warning: Foo\bar() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
27+
Warning: Foo\bar(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
2828
int(42)

Zend/tests/call_user_func_007.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ Notice: Undefined offset: 0 in %s on line %d
1515

1616
Warning: Trying to access array offset on value of type null in %s on line %d
1717

18-
Warning: foo() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
18+
Warning: foo(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
1919
array(0) {
2020
}

Zend/tests/call_user_func_008.phpt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,30 @@ var_dump($i, $j);
2525

2626
?>
2727
--EXPECTF--
28-
Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
28+
Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d
2929

30-
Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d
30+
Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d
3131
bool(true)
3232
int(0)
3333
int(0)
3434

35-
Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
35+
Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d
3636

37-
Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d
37+
Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d
3838
bool(true)
3939
int(0)
4040
int(0)
4141

42-
Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
42+
Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d
4343

44-
Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d
44+
Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d
4545
bool(true)
4646
int(0)
4747
int(0)
4848

49-
Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
49+
Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d
5050

51-
Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d
51+
Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d
5252
bool(true)
5353
int(0)
5454
int(0)

Zend/tests/call_user_func_009.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ var_dump(\call_user_func('sort', []));
1010

1111
?>
1212
--EXPECTF--
13-
Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d
13+
Warning: sort(): Argument #1 ($arg) must be passed by reference, value given in %s on line %d
1414
bool(true)
1515

16-
Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d
16+
Warning: sort(): Argument #1 ($arg) must be passed by reference, value given in %s on line %d
1717
bool(true)

Zend/tests/call_user_func_array_invalid_type.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ try {
1515
}
1616
?>
1717
--EXPECT--
18-
call_user_func_array() expects argument #2 ($args) to be of type array, null given
18+
call_user_func_array(): Argument #2 ($args) must be of type array, null given

Zend/tests/closure_027.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ NULL
3030
Warning: Undefined variable: y in %s on line %d
3131
Exception: Too few arguments to function {closure}(), 0 passed in %s on line %d and exactly 1 expected
3232

33-
Fatal error: Uncaught TypeError: test() expects argument #1 ($a) to be of type Closure, stdClass given, called in %s on line %d and defined in %s:%d
33+
Fatal error: Uncaught TypeError: test(): Argument #1 ($a) must be of type Closure, stdClass given, called in %s:%d
3434
Stack trace:
3535
#0 %s(%d): test(Object(stdClass))
3636
#1 {main}

Zend/tests/closure_059.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ try {
3333
echo "Exception: " . $e->getMessage() . "\n";
3434
}
3535
--EXPECTF--
36-
Exception: {closure}() expects argument #1 ($a) to be of type A, B given, called in %s on line %d
37-
Exception: {closure}() expects argument #1 ($a) to be of type A, B given
38-
Exception: {closure}() expects argument #1 ($a) to be of type A, B given
36+
Exception: {closure}(): Argument #1 ($a) must be of type A, B given, called in %s on line %d
37+
Exception: {closure}(): Argument #1 ($a) must be of type A, B given
38+
Exception: {closure}(): Argument #1 ($a) must be of type A, B given

Zend/tests/exception_017.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Error: Cannot call abstract method C::foo() in %s:%d
2828
Stack trace:
2929
#0 {main}
3030

31-
TypeError: foo() expects argument #1 ($x) to be of type callable, string given, called in %s on line %d and defined in %s:%d
31+
TypeError: foo(): Argument #1 ($x) must be of type callable, string given, called in %s:%d
3232
Stack trace:
3333
#0 %s(%d): foo('C::foo')
3434
#1 {main}

Zend/tests/exception_handler_004.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set_exception_handler(array("", ""));
99
echo "Done\n";
1010
?>
1111
--EXPECTF--
12-
Warning: set_exception_handler() expects argument #1 ($exception_handler) to be a valid callback in %s on line %d
12+
Warning: set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback in %s on line %d
1313

14-
Warning: set_exception_handler() expects argument #1 ($exception_handler) to be a valid callback in %s on line %d
14+
Warning: set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback in %s on line %d
1515
Done

Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ Too few arguments to function bar(), 1 passed in %s and exactly 2 expected
4949
ArgumentCountError
5050
Too few arguments to function bat(), 1 passed in %s and exactly 2 expected
5151
TypeError
52-
bat() expects argument #1 ($foo) to be of type int, string given, called in %s on line %d
52+
bat(): Argument #1 ($foo) must be of type int, string given, called in %s on line %d
5353
TypeError
54-
bat() expects argument #2 ($bar) to be of type string, int given, called in %s on line %d
54+
bat(): Argument #2 ($bar) must be of type string, int given, called in %s on line %d

Zend/tests/function_arguments/variadic_argument_type_error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ try {
1818
}
1919

2020
--EXPECTF--
21-
foo() expects argument #2 ($bar) to be of type int, array given, called in %s on line %d
22-
foo() expects argument #4 ($bar) to be of type int, array given, called in %s on line %d
21+
foo(): Argument #2 ($bar) must be of type int, array given, called in %s on line %d
22+
foo(): Argument #4 ($bar) must be of type int, array given, called in %s on line %d

Zend/tests/generators/generator_with_type_check.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function gen(array $a) { yield; }
66
gen(42);
77
?>
88
--EXPECTF--
9-
Fatal error: Uncaught TypeError: gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d and defined in %s:%d
9+
Fatal error: Uncaught TypeError: gen(): Argument #1 ($a) must be of type array, int given, called in %s:%d
1010
Stack trace:
1111
#0 %sgenerator_with_type_check.php(3): gen(42)
1212
#1 {main}

Zend/tests/generators/generator_with_type_check_2.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ try {
1818
}
1919
?>
2020
--EXPECTF--
21-
gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d
22-
gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d
21+
gen(): Argument #1 ($a) must be of type array, int given, called in %s on line %d
22+
gen(): Argument #1 ($a) must be of type array, int given, called in %s on line %d

Zend/tests/generators/throw_not_an_exception.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $gen->throw(new stdClass);
1212

1313
?>
1414
--EXPECTF--
15-
Fatal error: Uncaught TypeError: Generator::throw() expects argument #1 ($exception) to be of type Throwable, object given in %s:%d
15+
Fatal error: Uncaught TypeError: Generator::throw(): Argument #1 ($exception) must be of type Throwable, object given in %s:%d
1616
Stack trace:
1717
#0 %s(%d): Generator->throw(Object(stdClass))
1818
#1 {main}

Zend/tests/methods-on-non-objects-call-user-func.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ try {
1010
}
1111
?>
1212
--EXPECT--
13-
call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object
13+
call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object

Zend/tests/ns_071.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ new bar(new \stdclass);
1818
--EXPECTF--
1919
NULL
2020

21-
Fatal error: Uncaught TypeError: foo\bar::__construct() expects argument #1 ($x) to be of type ?array, object given, called in %s on line %d and defined in %s:%d
21+
Fatal error: Uncaught TypeError: foo\bar::__construct(): Argument #1 ($x) must be of type ?array, object given, called in %s:%d
2222
Stack trace:
2323
#0 %s(%d): foo\bar->__construct(Object(stdClass))
2424
#1 {main}

Zend/tests/ns_072.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ object(foo\test)#%d (0) {
3030
}
3131
NULL
3232

33-
Fatal error: Uncaught TypeError: foo\bar::__construct() expects argument #1 ($x) to be of type ?foo\foo, stdClass given, called in %s on line %d and defined in %s:%d
33+
Fatal error: Uncaught TypeError: foo\bar::__construct(): Argument #1 ($x) must be of type ?foo\foo, stdClass given, called in %s:%d
3434
Stack trace:
3535
#0 %s(%d): foo\bar->__construct(Object(stdClass))
3636
#1 {main}

Zend/tests/object_types/type_hint_in_class_method.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $one = new One();
1111
$one->a(new One());
1212
$one->a(123);
1313
--EXPECTF--
14-
Fatal error: Uncaught TypeError: One::a() expects argument #1 ($obj) to be of type object, int given, called in %s:%d
14+
Fatal error: Uncaught TypeError: One::a(): Argument #1 ($obj) must be of type object, int given, called in %s:%d
1515
Stack trace:
1616
#0 %s(9): One->a(123)
1717
#1 {main}

Zend/tests/object_types/type_hint_in_function.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function a(object $obj) {}
99
a(new A());
1010
a(123);
1111
--EXPECTF--
12-
Fatal error: Uncaught TypeError: a() expects argument #1 ($obj) to be of type object, int given, called in %s on line %d and defined in %s:%d
12+
Fatal error: Uncaught TypeError: a(): Argument #1 ($obj) must be of type object, int given, called in %s:%d
1313
Stack trace:
1414
#0 %s(7): a(123)
1515
#1 {main}

0 commit comments

Comments
 (0)