From: Nikita Popov Date: Sun, 17 May 2015 16:59:34 +0000 (+0200) Subject: Display TypeExceptions like normal exceptions X-Git-Tag: PRE_PHP7_NSAPI_REMOVAL~42^2~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=440481fb3e15d78d0d92432c3adba9067989f43a;p=php Display TypeExceptions like normal exceptions We currently don't show the argument at which the error actually occured in the trace - should probably either add it or don't display args on incomplete frames altogether, otherwise this'll probably be confusing. --- diff --git a/Zend/tests/array_type_hint_001.phpt b/Zend/tests/array_type_hint_001.phpt index 8753a26d7a..f5cc76de1d 100644 --- a/Zend/tests/array_type_hint_001.phpt +++ b/Zend/tests/array_type_hint_001.phpt @@ -12,4 +12,8 @@ foo(123); --EXPECTF-- 3 -Fatal error: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php on line 2 +Fatal error: Uncaught TypeException: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php:2 +Stack trace: +#0 %s(%d): foo() +#1 {main} + thrown in %sarray_type_hint_001.php on line 2 diff --git a/Zend/tests/bug33996.phpt b/Zend/tests/bug33996.phpt index 678f10053e..66ea0822a2 100644 --- a/Zend/tests/bug33996.phpt +++ b/Zend/tests/bug33996.phpt @@ -26,4 +26,8 @@ FooTest(new Foo()); --EXPECTF-- Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d Hi! -Fatal error: Argument 1 passed to FooTest() must be an instance of Foo, none given, called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to FooTest() must be an instance of Foo, none given, called in %sbug33996.php on line %d and defined in %sbug33996.php:%d +Stack trace: +#0 %s(%d): FooTest() +#1 {main} + thrown in %sbug33996.php on line %d diff --git a/Zend/tests/bug39003.phpt b/Zend/tests/bug39003.phpt index 8b2c87ce9e..80ed7c897f 100644 --- a/Zend/tests/bug39003.phpt +++ b/Zend/tests/bug39003.phpt @@ -21,4 +21,8 @@ test($obj); echo "Done\n"; ?> --EXPECTF-- -Fatal error: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(%d): test() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/bug42802.phpt b/Zend/tests/bug42802.phpt index b74ace1999..abbac47c9e 100644 --- a/Zend/tests/bug42802.phpt +++ b/Zend/tests/bug42802.phpt @@ -37,4 +37,8 @@ ok ok ok -Fatal error: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php:%d +Stack trace: +#0 %s(%d): foo\test5() +#1 {main} + thrown in %sbug42802.php on line %d diff --git a/Zend/tests/bug43332_1.phpt b/Zend/tests/bug43332_1.phpt index 1642d6aed0..6506f9c591 100644 --- a/Zend/tests/bug43332_1.phpt +++ b/Zend/tests/bug43332_1.phpt @@ -12,4 +12,8 @@ $foo = new foo; $foo->bar($foo); // Ok! $foo->bar(new \stdclass); // Error, ok! --EXPECTF-- -Fatal error: Argument 1 passed to foobar\foo::bar() must be an instance of foobar\foo, instance of stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php on line 5 +Fatal error: Uncaught TypeException: Argument 1 passed to foobar\foo::bar() must be an instance of foobar\foo, instance of stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5 +Stack trace: +#0 %s(%d): foobar\foo->bar() +#1 {main} + thrown in %sbug43332_1.php on line 5 diff --git a/Zend/tests/bug55705.phpt b/Zend/tests/bug55705.phpt index e2656cbddb..4b3e9413db 100644 --- a/Zend/tests/bug55705.phpt +++ b/Zend/tests/bug55705.phpt @@ -6,4 +6,8 @@ function f(callable $c) {} f(); ?> --EXPECTF-- -Fatal error: Argument 1 passed to f() must be callable, none given, called in %s on line 3 and defined in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to f() must be callable, none given, called in %s on line 3 and defined in %s:%d +Stack trace: +#0 %s(%d): f() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/bug68446.phpt b/Zend/tests/bug68446.phpt index e19610b5ca..6a7f914810 100644 --- a/Zend/tests/bug68446.phpt +++ b/Zend/tests/bug68446.phpt @@ -32,5 +32,9 @@ array(1) { int(1) } -Fatal error: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(%d): a() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/closure_027.phpt b/Zend/tests/closure_027.phpt index 442615c278..7024a93c55 100644 --- a/Zend/tests/closure_027.phpt +++ b/Zend/tests/closure_027.phpt @@ -28,4 +28,8 @@ Notice: Undefined variable: y in %s on line %d Warning: Missing argument 1 for {closure}(), called in %s on line %d and defined in %s on line %d NULL -Fatal error: Argument 1 passed to test() must be an instance of Closure, instance of stdClass given, called in %s on line %d and defined in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to test() must be an instance of Closure, instance of stdClass given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(%d): test() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/ns_071.phpt b/Zend/tests/ns_071.phpt index 9965fde809..08a0b898d6 100644 --- a/Zend/tests/ns_071.phpt +++ b/Zend/tests/ns_071.phpt @@ -18,4 +18,8 @@ new bar(new \stdclass); --EXPECTF-- NULL -Fatal error: Argument 1 passed to foo\bar::__construct() must be of the type array, object given, called in %s on line %d and defined in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to foo\bar::__construct() must be of the type array, object given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(%d): foo\bar->__construct() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/ns_072.phpt b/Zend/tests/ns_072.phpt index 2ae417e957..95f8f95045 100644 --- a/Zend/tests/ns_072.phpt +++ b/Zend/tests/ns_072.phpt @@ -30,4 +30,8 @@ object(foo\test)#%d (0) { } NULL -Fatal error: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo, instance of stdClass given, called in %s on line %d and defined in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo, instance of stdClass given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(%d): foo\bar->__construct() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/objects_022.phpt b/Zend/tests/objects_022.phpt index 3c2e0d4a51..e96a6aa163 100644 --- a/Zend/tests/objects_022.phpt +++ b/Zend/tests/objects_022.phpt @@ -36,4 +36,8 @@ object(bar)#%d (0) { object(baz)#%d (0) { } -Fatal error: Argument 1 passed to foo::testFoo() must be an instance of foo, instance of stdClass given, called in %s on line %d and defined in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to foo::testFoo() must be an instance of foo, instance of stdClass given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(%d): foo->testFoo() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/return_types/001.phpt b/Zend/tests/return_types/001.phpt index c09d627be9..2d2966aed3 100644 --- a/Zend/tests/return_types/001.phpt +++ b/Zend/tests/return_types/001.phpt @@ -9,4 +9,8 @@ function test1() : array { test1(); --EXPECTF-- -Fatal error: Return value of test1() must be of the type array, none returned in %s on line %d +Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, none returned in %s:%d +Stack trace: +#0 %s(%d): test1() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/return_types/002.phpt b/Zend/tests/return_types/002.phpt index 553611597d..92553ee89e 100644 --- a/Zend/tests/return_types/002.phpt +++ b/Zend/tests/return_types/002.phpt @@ -10,4 +10,8 @@ function test1() : array { test1(); --EXPECTF-- -Fatal error: Return value of test1() must be of the type array, null returned in %s on line %d +Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, null returned in %s:%d +Stack trace: +#0 %s(%d): test1() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/return_types/003.phpt b/Zend/tests/return_types/003.phpt index 26a827158b..20dd8bff62 100644 --- a/Zend/tests/return_types/003.phpt +++ b/Zend/tests/return_types/003.phpt @@ -9,4 +9,8 @@ function test1() : array { test1(); --EXPECTF-- -Fatal error: Return value of test1() must be of the type array, integer returned in %s on line %d +Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, integer returned in %s:%d +Stack trace: +#0 %s(%d): test1() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/return_types/004.phpt b/Zend/tests/return_types/004.phpt index 41f06bf014..f7a4b3dea2 100644 --- a/Zend/tests/return_types/004.phpt +++ b/Zend/tests/return_types/004.phpt @@ -10,4 +10,8 @@ function test1() : array { test1(); --EXPECTF-- -Fatal error: Return value of test1() must be of the type array, string returned in %s on line %d +Fatal error: Uncaught TypeException: Return value of test1() must be of the type array, string returned in %s:%d +Stack trace: +#0 %s(%d): test1() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/return_types/005.phpt b/Zend/tests/return_types/005.phpt index d3ae04769a..edf54db07c 100644 --- a/Zend/tests/return_types/005.phpt +++ b/Zend/tests/return_types/005.phpt @@ -15,4 +15,8 @@ $qux = new qux(); $qux->foo(); --EXPECTF-- -Fatal error: Return value of qux::foo() must be an instance of foo, instance of qux returned in %s on line %d +Fatal error: Uncaught TypeException: Return value of qux::foo() must be an instance of foo, instance of qux returned in %s:%d +Stack trace: +#0 %s(%d): qux->foo() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/return_types/010.phpt b/Zend/tests/return_types/010.phpt index 5f53220815..ce297b01b1 100644 --- a/Zend/tests/return_types/010.phpt +++ b/Zend/tests/return_types/010.phpt @@ -11,4 +11,8 @@ $array = [1, 2, 3]; var_dump(foo($array)); --EXPECTF-- -Fatal error: Return value of foo() must be of the type array, null returned in %s on line %d +Fatal error: Uncaught TypeException: Return value of foo() must be of the type array, null returned in %s:%d +Stack trace: +#0 %s(%d): foo(Array) +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/return_types/013.phpt b/Zend/tests/return_types/013.phpt index ee6568522f..b0acb36132 100644 --- a/Zend/tests/return_types/013.phpt +++ b/Zend/tests/return_types/013.phpt @@ -16,4 +16,8 @@ $baz = new foo(); var_dump($func=$baz->bar(), $func()); --EXPECTF-- -Fatal error: Return value of foo::{closure}() must be of the type array, null returned in %s on line %d +Fatal error: Uncaught TypeException: Return value of foo::{closure}() must be of the type array, null returned in %s:%d +Stack trace: +#0 %s(%d): foo->{closure}() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/return_types/rfc001.phpt b/Zend/tests/return_types/rfc001.phpt index df96e7edb8..de308ca26c 100644 --- a/Zend/tests/return_types/rfc001.phpt +++ b/Zend/tests/return_types/rfc001.phpt @@ -11,4 +11,8 @@ function get_config(): array { get_config(); --EXPECTF-- -Fatal error: Return value of get_config() must be of the type array, integer returned in %s on line %d +Fatal error: Uncaught TypeException: Return value of get_config() must be of the type array, integer returned in %s:%d +Stack trace: +#0 %s(%d): get_config() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/return_types/rfc003.phpt b/Zend/tests/return_types/rfc003.phpt index 1fdf19f612..2beb6f3650 100644 --- a/Zend/tests/return_types/rfc003.phpt +++ b/Zend/tests/return_types/rfc003.phpt @@ -10,4 +10,8 @@ function foo(): DateTime { foo(); --EXPECTF-- -Fatal error: Return value of foo() must be an instance of DateTime, null returned in %s on line %d +Fatal error: Uncaught TypeException: Return value of foo() must be an instance of DateTime, null returned in %s:%d +Stack trace: +#0 %s(%d): foo() +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/typehints/explicit_weak_include_strict.phpt b/Zend/tests/typehints/explicit_weak_include_strict.phpt index a5f267cbef..d39c6b6a0a 100644 --- a/Zend/tests/typehints/explicit_weak_include_strict.phpt +++ b/Zend/tests/typehints/explicit_weak_include_strict.phpt @@ -11,4 +11,9 @@ require 'weak_include_strict_2.inc'; // calls within that file should stay strict, despite being included by weak file ?> --EXPECTF-- -Fatal error: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc on line 5 +Fatal error: Uncaught TypeException: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5 +Stack trace: +#0 %s(%d): takes_int() +#1 %s(%d): require('%s') +#2 {main} + thrown in %sweak_include_strict_2.inc on line 5 diff --git a/Zend/tests/typehints/scalar_constant_defaults_error.phpt b/Zend/tests/typehints/scalar_constant_defaults_error.phpt index 53938d724f..4e037bafb3 100644 --- a/Zend/tests/typehints/scalar_constant_defaults_error.phpt +++ b/Zend/tests/typehints/scalar_constant_defaults_error.phpt @@ -13,4 +13,8 @@ var_dump(int_val()); ?> --EXPECTF-- -Fatal error: Argument 1 passed to int_val() must be of the type integer, string given, called in %s on line %d and defined in %s on line %d \ No newline at end of file +Fatal error: Uncaught TypeException: Argument 1 passed to int_val() must be of the type integer, string given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(%d): int_val() +#1 {main} + thrown in %s on line %d \ No newline at end of file diff --git a/Zend/tests/typehints/strict_call_weak.phpt b/Zend/tests/typehints/strict_call_weak.phpt index 94d5953f2b..3b92244824 100644 --- a/Zend/tests/typehints/strict_call_weak.phpt +++ b/Zend/tests/typehints/strict_call_weak.phpt @@ -13,5 +13,9 @@ require 'strict_call_weak_2.inc'; function_declared_in_weak_mode(1.0); ?> --EXPECTF-- -Fatal error: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc on line 5 +Fatal error: Uncaught TypeException: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc:5 +Stack trace: +#0 %s(%d): function_declared_in_weak_mode() +#1 {main} + thrown in %sstrict_call_weak_2.inc on line 5 diff --git a/Zend/tests/typehints/strict_call_weak_explicit.phpt b/Zend/tests/typehints/strict_call_weak_explicit.phpt index 2d573e85f2..fdb92fcf29 100644 --- a/Zend/tests/typehints/strict_call_weak_explicit.phpt +++ b/Zend/tests/typehints/strict_call_weak_explicit.phpt @@ -13,5 +13,9 @@ require 'strict_call_weak_explicit_2.inc'; function_declared_in_weak_mode(1.0); ?> --EXPECTF-- -Fatal error: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc on line 5 +Fatal error: Uncaught TypeException: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc:5 +Stack trace: +#0 %s(%d): function_declared_in_weak_mode() +#1 {main} + thrown in %sstrict_call_weak_explicit_2.inc on line 5 diff --git a/Zend/tests/typehints/weak_include_strict.phpt b/Zend/tests/typehints/weak_include_strict.phpt index c3a0820657..4d91e7baa8 100644 --- a/Zend/tests/typehints/weak_include_strict.phpt +++ b/Zend/tests/typehints/weak_include_strict.phpt @@ -11,4 +11,9 @@ require 'weak_include_strict_2.inc'; // calls within that file should stay strict, despite being included by weak file ?> --EXPECTF-- -Fatal error: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc on line 5 +Fatal error: Uncaught TypeException: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5 +Stack trace: +#0 %s(%d): takes_int() +#1 %s(%d): require('%s') +#2 {main} + thrown in %sweak_include_strict_2.inc on line 5 diff --git a/Zend/tests/variadic/typehint_error.phpt b/Zend/tests/variadic/typehint_error.phpt index 2661567224..f901147dc5 100644 --- a/Zend/tests/variadic/typehint_error.phpt +++ b/Zend/tests/variadic/typehint_error.phpt @@ -33,4 +33,8 @@ array(3) { } } -Fatal error: Argument 3 passed to test() must be of the type array, integer given, called in %s on line %d +Fatal error: Uncaught TypeException: Argument 3 passed to test() must be of the type array, integer given, called in %s:%d +Stack trace: +#0 %s(%d): test(Array, Array) +#1 {main} + thrown in %s on line %d diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 94a51cf1ef..9ad221d695 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -652,6 +652,12 @@ ZEND_METHOD(exception, __toString) ZVAL_UNDEF(&trace); } + if (Z_OBJCE_P(exception) == type_exception_ce && strstr(message->val, ", called in ")) { + zend_string *real_message = zend_strpprintf(0, "%s and defined", message->val); + zend_string_release(message); + message = real_message; + } + if (message->len > 0) { str = zend_strpprintf(0, "%s: %s in %s:" ZEND_LONG_FMT "\nStack trace:\n%s%s%s", @@ -908,17 +914,13 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */ ZVAL_OBJ(&exception, ex); ce_exception = Z_OBJCE(exception); EG(exception) = NULL; - if (ce_exception == parse_exception_ce || ce_exception == type_exception_ce) { + if (ce_exception == parse_exception_ce) { zend_string *message = zval_get_string(GET_PROPERTY(&exception, "message")); zend_string *file = zval_get_string(GET_PROPERTY_SILENT(&exception, "file")); zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, "line")); zend_long code = zval_get_long(GET_PROPERTY_SILENT(&exception, "code")); - if (ce_exception == type_exception_ce && strstr(message->val, ", called in ")) { - zend_error_helper(code, file->val, line, "%s and defined", message->val); - } else { - zend_error_helper(code, file->val, line, "%s", message->val); - } + zend_error_helper(code, file->val, line, "%s", message->val); zend_string_release(file); zend_string_release(message); diff --git a/ext/date/tests/014.phpt b/ext/date/tests/014.phpt index 3ff2b7d931..02e9907674 100644 --- a/ext/date/tests/014.phpt +++ b/ext/date/tests/014.phpt @@ -37,4 +37,8 @@ Warning: timezone_offset_get() expects exactly 2 parameters, 0 given in %s on li bool(false) int(0) -Fatal error: Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of DateTime given in %s +Fatal error: Uncaught TypeException: Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of DateTime given in %s:%d +Stack trace: +#0 %s(%d): timezone_offset_get(Object(DateTime), Object(DateTimeZone)) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_add_error.phpt b/ext/intl/tests/calendar_add_error.phpt index 0cc4abcf3f..b9e9cdce63 100644 --- a/ext/intl/tests/calendar_add_error.phpt +++ b/ext/intl/tests/calendar_add_error.phpt @@ -38,4 +38,8 @@ Warning: intlcal_add() expects exactly 3 parameters, 4 given in %s on line %d Warning: intlcal_add(): intlcal_add: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_add() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_add() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_add(1, 2, 3) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt index 37f8d5c019..13c6a5b51f 100644 --- a/ext/intl/tests/calendar_clear_error.phpt +++ b/ext/intl/tests/calendar_clear_error.phpt @@ -28,4 +28,8 @@ bool(false) Warning: intlcal_clear(): intlcal_clear: invalid field in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_clear() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_clear() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_clear(1, 2) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_fieldDifference_error.phpt b/ext/intl/tests/calendar_fieldDifference_error.phpt index 8df95c2680..beb81758be 100644 --- a/ext/intl/tests/calendar_fieldDifference_error.phpt +++ b/ext/intl/tests/calendar_fieldDifference_error.phpt @@ -39,4 +39,8 @@ Warning: intlcal_field_difference() expects exactly 3 parameters, 4 given in %s Warning: intlcal_field_difference(): intlcal_field_difference: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_field_difference() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_field_difference() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_field_difference(1, 0, 1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt index 33457b8e40..8ba0712e68 100644 --- a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt +++ b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt @@ -41,4 +41,8 @@ Warning: intlcal_get_day_of_week_type() expects parameter 2 to be integer, strin Warning: intlcal_get_day_of_week_type(): intlcal_get_day_of_week_type: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_get_day_of_week_type() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_day_of_week_type() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_get_day_of_week_type(1, 1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_getErrorCode_error.phpt b/ext/intl/tests/calendar_getErrorCode_error.phpt index be5bb507ad..23fa9d67c4 100644 --- a/ext/intl/tests/calendar_getErrorCode_error.phpt +++ b/ext/intl/tests/calendar_getErrorCode_error.phpt @@ -23,4 +23,8 @@ Warning: IntlCalendar::getErrorCode() expects exactly 0 parameters, 1 given in % Warning: IntlCalendar::getErrorCode(): intlcal_get_error_code: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_get_error_code() must be an instance of IntlCalendar, null given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_error_code() must be an instance of IntlCalendar, null given in %s:%d +Stack trace: +#0 %s(%d): intlcal_get_error_code(NULL) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_getErrorMessage_error.phpt b/ext/intl/tests/calendar_getErrorMessage_error.phpt index 16768304a1..69329e6db4 100644 --- a/ext/intl/tests/calendar_getErrorMessage_error.phpt +++ b/ext/intl/tests/calendar_getErrorMessage_error.phpt @@ -23,4 +23,8 @@ Warning: IntlCalendar::getErrorMessage() expects exactly 0 parameters, 1 given i Warning: IntlCalendar::getErrorMessage(): intlcal_get_error_message: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_get_error_message() must be an instance of IntlCalendar, null given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_error_message() must be an instance of IntlCalendar, null given in %s:%d +Stack trace: +#0 %s(%d): intlcal_get_error_message(NULL) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt index b6675b5867..13beb5348e 100644 --- a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt +++ b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt @@ -29,4 +29,8 @@ Warning: intlcal_get_first_day_of_week() expects exactly 1 parameter, 2 given in Warning: intlcal_get_first_day_of_week(): intlcal_get_first_day_of_week: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_get_first_day_of_week() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_first_day_of_week() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_get_first_day_of_week(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_getLocale_error.phpt b/ext/intl/tests/calendar_getLocale_error.phpt index 6923efd025..8c7a886caa 100644 --- a/ext/intl/tests/calendar_getLocale_error.phpt +++ b/ext/intl/tests/calendar_getLocale_error.phpt @@ -39,4 +39,8 @@ Warning: intlcal_get_locale() expects exactly 2 parameters, 1 given in %s on lin Warning: intlcal_get_locale(): intlcal_get_locale: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_get_locale() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_locale() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_get_locale(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt index 02df2d59c4..6ad098773e 100644 --- a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt +++ b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt @@ -29,4 +29,8 @@ Warning: intlcal_get_minimal_days_in_first_week() expects exactly 1 parameter, 2 Warning: intlcal_get_minimal_days_in_first_week(): intlcal_get_minimal_days_in_first_week: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_get_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_get_minimal_days_in_first_week(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt index e64983acc7..403f6f7ebd 100644 --- a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt +++ b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt @@ -44,4 +44,8 @@ Warning: intlcal_get_repeated_wall_time_option() expects exactly 1 parameter, 2 Warning: intlcal_get_repeated_wall_time_option(): intlcal_get_repeated_wall_time_option: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_get_skipped_wall_time_option() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_skipped_wall_time_option() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_get_skipped_wall_time_option(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_getTimeZone_error.phpt b/ext/intl/tests/calendar_getTimeZone_error.phpt index 789623676a..1eb8e00f75 100644 --- a/ext/intl/tests/calendar_getTimeZone_error.phpt +++ b/ext/intl/tests/calendar_getTimeZone_error.phpt @@ -29,4 +29,8 @@ Warning: intlcal_get_time_zone() expects exactly 1 parameter, 2 given in %s on l Warning: intlcal_get_time_zone(): intlcal_get_time_zone: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_get_time_zone() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_time_zone() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_get_time_zone(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_getTime_error.phpt b/ext/intl/tests/calendar_getTime_error.phpt index 216d20e412..ed2687377f 100644 --- a/ext/intl/tests/calendar_getTime_error.phpt +++ b/ext/intl/tests/calendar_getTime_error.phpt @@ -28,4 +28,8 @@ Warning: intlcal_get_time() expects exactly 1 parameter, 2 given in %s on line % Warning: intlcal_get_time(): intlcal_get_time: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_get_time() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_time() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_get_time(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_getType_error.phpt b/ext/intl/tests/calendar_getType_error.phpt index 9b65244a25..e5333cb016 100644 --- a/ext/intl/tests/calendar_getType_error.phpt +++ b/ext/intl/tests/calendar_getType_error.phpt @@ -29,4 +29,8 @@ Warning: intlcal_get_type() expects exactly 1 parameter, 2 given in %s on line % Warning: intlcal_get_type(): intlcal_get_type: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_get_type() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_type() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_get_type(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_getWeekendTransition_error.phpt b/ext/intl/tests/calendar_getWeekendTransition_error.phpt index e642fa8ca1..210735b2a0 100644 --- a/ext/intl/tests/calendar_getWeekendTransition_error.phpt +++ b/ext/intl/tests/calendar_getWeekendTransition_error.phpt @@ -41,4 +41,8 @@ Warning: intlcal_get_weekend_transition() expects exactly 2 parameters, 1 given Warning: intlcal_get_weekend_transition(): intlcal_get_weekend_transition: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_get_weekend_transition() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_get_weekend_transition() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_get_weekend_transition(1, 1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_inDaylightTime_error.phpt b/ext/intl/tests/calendar_inDaylightTime_error.phpt index f39f85f625..6d7ebcfeca 100644 --- a/ext/intl/tests/calendar_inDaylightTime_error.phpt +++ b/ext/intl/tests/calendar_inDaylightTime_error.phpt @@ -29,4 +29,8 @@ Warning: intlcal_in_daylight_time() expects exactly 1 parameter, 2 given in %s o Warning: intlcal_in_daylight_time(): intlcal_in_daylight_time: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_in_daylight_time() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_in_daylight_time() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_in_daylight_time(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_isLenient_error.phpt b/ext/intl/tests/calendar_isLenient_error.phpt index ea4aab2a13..7a9d9f109c 100644 --- a/ext/intl/tests/calendar_isLenient_error.phpt +++ b/ext/intl/tests/calendar_isLenient_error.phpt @@ -29,4 +29,8 @@ Warning: intlcal_is_lenient() expects exactly 1 parameter, 2 given in %s on line Warning: intlcal_is_lenient(): intlcal_is_lenient: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_is_lenient() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_is_lenient() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_is_lenient(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_isSet_error.phpt b/ext/intl/tests/calendar_isSet_error.phpt index 66060fc081..c9497bea09 100644 --- a/ext/intl/tests/calendar_isSet_error.phpt +++ b/ext/intl/tests/calendar_isSet_error.phpt @@ -39,4 +39,8 @@ Warning: intlcal_is_set() expects exactly 2 parameters, 1 given in %s on line %d Warning: intlcal_is_set(): intlcal_is_set: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_is_set() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_is_set() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_is_set(1, 2) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt index cac7a0de8b..0538fa95ca 100644 --- a/ext/intl/tests/calendar_isWeekend_error.phpt +++ b/ext/intl/tests/calendar_isWeekend_error.phpt @@ -35,4 +35,8 @@ Warning: intlcal_is_weekend() expects parameter 2 to be float, string given in % Warning: intlcal_is_weekend(): intlcal_is_weekend: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_is_weekend() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_is_weekend() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_is_weekend(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_roll_error.phpt b/ext/intl/tests/calendar_roll_error.phpt index e8669baabe..a496089026 100644 --- a/ext/intl/tests/calendar_roll_error.phpt +++ b/ext/intl/tests/calendar_roll_error.phpt @@ -34,4 +34,8 @@ bool(false) Warning: intlcal_roll(): intlcal_set: too many arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_roll() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_roll() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_roll(1, 2, 3) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt index bbbbcf30fb..8d24a61d6b 100644 --- a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt +++ b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt @@ -37,4 +37,8 @@ bool(false) Warning: intlcal_set_first_day_of_week(): intlcal_set_first_day_of_week: invalid day of week in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_set_first_day_of_week() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_first_day_of_week() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_set_first_day_of_week(1, 2) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_setLenient_error.phpt b/ext/intl/tests/calendar_setLenient_error.phpt index 37817c61c2..a1516b9c0e 100644 --- a/ext/intl/tests/calendar_setLenient_error.phpt +++ b/ext/intl/tests/calendar_setLenient_error.phpt @@ -41,4 +41,8 @@ Warning: intlcal_set_lenient() expects parameter 2 to be boolean, array given in Warning: intlcal_set_lenient(): intlcal_set_lenient: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_set_lenient() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_lenient() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_set_lenient(1, false) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt index 098c46a44a..406eebd356 100644 --- a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt +++ b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt @@ -36,5 +36,9 @@ bool(false) Warning: intlcal_set_minimal_days_in_first_week(): intlcal_set_minimal_days_in_first_week: invalid number of days; must be between 1 and 7 in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_set_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_minimal_days_in_first_week() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_set_minimal_days_in_first_week(1, 2) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt index 2621e11d52..fa26ef3491 100644 --- a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt +++ b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt @@ -79,4 +79,8 @@ Warning: intlcal_set_repeated_wall_time_option() expects exactly 2 parameters, 1 Warning: intlcal_set_repeated_wall_time_option(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_set_repeated_wall_time_option() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_repeated_wall_time_option() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_set_repeated_wall_time_option(1, 1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_setTime_error.phpt b/ext/intl/tests/calendar_setTime_error.phpt index f00597b00d..e086d77470 100644 --- a/ext/intl/tests/calendar_setTime_error.phpt +++ b/ext/intl/tests/calendar_setTime_error.phpt @@ -34,4 +34,8 @@ Warning: intlcal_set_time() expects exactly 2 parameters, 3 given in %s on line Warning: intlcal_set_time(): intlcal_set_time: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_set_time(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt index a61e631174..ecbc822e55 100644 --- a/ext/intl/tests/calendar_set_error.phpt +++ b/ext/intl/tests/calendar_set_error.phpt @@ -38,4 +38,8 @@ bool(false) Warning: intlcal_set(): intlcal_set: invalid field in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlcal_set() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_set() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_set(1, 2, 3) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/calendar_toDateTime_error.phpt b/ext/intl/tests/calendar_toDateTime_error.phpt index ac31e75ab5..a4b7bc3807 100644 --- a/ext/intl/tests/calendar_toDateTime_error.phpt +++ b/ext/intl/tests/calendar_toDateTime_error.phpt @@ -38,4 +38,8 @@ bool(false) Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: DateTimeZone constructor threw exception in %s on line %d string(77) "exception: DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)" -Fatal error: Argument 1 passed to intlcal_to_date_time() must be an instance of IntlCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlcal_to_date_time() must be an instance of IntlCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlcal_to_date_time(3) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt index 6d7862f941..59d74aca1e 100644 --- a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt +++ b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt @@ -27,4 +27,8 @@ Warning: intlgregcal_get_gregorian_change() expects exactly 1 parameter, 2 given Warning: intlgregcal_get_gregorian_change(): intlgregcal_get_gregorian_change: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlgregcal_get_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlgregcal_get_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlgregcal_get_gregorian_change(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt index 5c72929c94..04b047dd20 100644 --- a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt +++ b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt @@ -45,4 +45,8 @@ Warning: intlgregcal_is_leap_year() expects exactly 2 parameters, 1 given in %s Warning: intlgregcal_is_leap_year(): intlgregcal_is_leap_year: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlgregcal_is_leap_year() must be an instance of IntlGregorianCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlgregcal_is_leap_year() must be an instance of IntlGregorianCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlgregcal_is_leap_year(1, 2) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt index 5c426b3486..df74807ca8 100644 --- a/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt +++ b/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt @@ -39,4 +39,8 @@ Warning: intlgregcal_set_gregorian_change() expects exactly 2 parameters, 1 give Warning: intlgregcal_set_gregorian_change(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intlgregcal_set_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intlgregcal_set_gregorian_change() must be an instance of IntlGregorianCalendar, integer given in %s:%d +Stack trace: +#0 %s(%d): intlgregcal_set_gregorian_change(1, 4) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/timezone_getDSTSavings_error.phpt b/ext/intl/tests/timezone_getDSTSavings_error.phpt index bd78e9f8f4..5d9a1a2fc3 100644 --- a/ext/intl/tests/timezone_getDSTSavings_error.phpt +++ b/ext/intl/tests/timezone_getDSTSavings_error.phpt @@ -20,4 +20,8 @@ Warning: IntlTimeZone::getDSTSavings() expects exactly 0 parameters, 1 given in Warning: IntlTimeZone::getDSTSavings(): intltz_get_dst_savings: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intltz_get_dst_savings() must be an instance of IntlTimeZone, null given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_dst_savings() must be an instance of IntlTimeZone, null given in %s:%d +Stack trace: +#0 %s(%d): intltz_get_dst_savings(NULL) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/timezone_getDisplayName_error.phpt b/ext/intl/tests/timezone_getDisplayName_error.phpt index 8a527cd925..89e77b5614 100644 --- a/ext/intl/tests/timezone_getDisplayName_error.phpt +++ b/ext/intl/tests/timezone_getDisplayName_error.phpt @@ -42,4 +42,8 @@ Warning: IntlTimeZone::getDisplayName() expects at most 3 parameters, 4 given in Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intltz_get_display_name() must be an instance of IntlTimeZone, null given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_display_name() must be an instance of IntlTimeZone, null given in %s:%d +Stack trace: +#0 %s(%d): intltz_get_display_name(NULL, 1, false, 'pt_PT') +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/timezone_getErrorCode_error.phpt b/ext/intl/tests/timezone_getErrorCode_error.phpt index cb28628bf3..5d5f4d74a3 100644 --- a/ext/intl/tests/timezone_getErrorCode_error.phpt +++ b/ext/intl/tests/timezone_getErrorCode_error.phpt @@ -20,4 +20,8 @@ Warning: IntlTimeZone::getErrorCode() expects exactly 0 parameters, 1 given in % Warning: IntlTimeZone::getErrorCode(): intltz_get_error_code: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intltz_get_error_code() must be an instance of IntlTimeZone, null given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_error_code() must be an instance of IntlTimeZone, null given in %s:%d +Stack trace: +#0 %s(%d): intltz_get_error_code(NULL) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/timezone_getErrorMessage_error.phpt b/ext/intl/tests/timezone_getErrorMessage_error.phpt index 2ef5aa75f1..9a71ea4aac 100644 --- a/ext/intl/tests/timezone_getErrorMessage_error.phpt +++ b/ext/intl/tests/timezone_getErrorMessage_error.phpt @@ -20,4 +20,8 @@ Warning: IntlTimeZone::getErrorMessage() expects exactly 0 parameters, 1 given i Warning: IntlTimeZone::getErrorMessage(): intltz_get_error_message: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intltz_get_error_message() must be an instance of IntlTimeZone, null given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_error_message() must be an instance of IntlTimeZone, null given in %s:%d +Stack trace: +#0 %s(%d): intltz_get_error_message(NULL) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/timezone_getID_error.phpt b/ext/intl/tests/timezone_getID_error.phpt index ad28532508..36932e1f8d 100644 --- a/ext/intl/tests/timezone_getID_error.phpt +++ b/ext/intl/tests/timezone_getID_error.phpt @@ -20,4 +20,8 @@ Warning: IntlTimeZone::getID() expects exactly 0 parameters, 1 given in %s on li Warning: IntlTimeZone::getID(): intltz_get_id: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intltz_get_id() must be an instance of IntlTimeZone, null given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_id() must be an instance of IntlTimeZone, null given in %s:%d +Stack trace: +#0 %s(%d): intltz_get_id(NULL) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/timezone_getOffset_error.phpt b/ext/intl/tests/timezone_getOffset_error.phpt index 296eb1dd1a..d87c2aab32 100644 --- a/ext/intl/tests/timezone_getOffset_error.phpt +++ b/ext/intl/tests/timezone_getOffset_error.phpt @@ -30,4 +30,8 @@ Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 5 given in %s o Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s:%d +Stack trace: +#0 %s(%d): intltz_get_offset(NULL, %d, false, NULL, NULL) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/timezone_getRawOffset_error.phpt b/ext/intl/tests/timezone_getRawOffset_error.phpt index 2d23b4ee18..80f8ce01d2 100644 --- a/ext/intl/tests/timezone_getRawOffset_error.phpt +++ b/ext/intl/tests/timezone_getRawOffset_error.phpt @@ -20,4 +20,8 @@ Warning: IntlTimeZone::getRawOffset() expects exactly 0 parameters, 1 given in % Warning: IntlTimeZone::getRawOffset(): intltz_get_raw_offset: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intltz_get_raw_offset() must be an instance of IntlTimeZone, null given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intltz_get_raw_offset() must be an instance of IntlTimeZone, null given in %s:%d +Stack trace: +#0 %s(%d): intltz_get_raw_offset(NULL) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/timezone_toDateTimeZone_error.phpt b/ext/intl/tests/timezone_toDateTimeZone_error.phpt index aa33f9196d..d0a9e73117 100644 --- a/ext/intl/tests/timezone_toDateTimeZone_error.phpt +++ b/ext/intl/tests/timezone_toDateTimeZone_error.phpt @@ -35,4 +35,8 @@ Warning: intltz_to_date_time_zone() expects exactly 1 parameter, 0 given in %s o Warning: intltz_to_date_time_zone(): intltz_to_date_time_zone: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intltz_to_date_time_zone() must be an instance of IntlTimeZone, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intltz_to_date_time_zone() must be an instance of IntlTimeZone, integer given in %s:%d +Stack trace: +#0 %s(%d): intltz_to_date_time_zone(1) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/timezone_useDaylightTime_error.phpt b/ext/intl/tests/timezone_useDaylightTime_error.phpt index 455a9acf11..ab63d7a428 100644 --- a/ext/intl/tests/timezone_useDaylightTime_error.phpt +++ b/ext/intl/tests/timezone_useDaylightTime_error.phpt @@ -19,4 +19,8 @@ Warning: IntlTimeZone::useDaylightTime() expects exactly 0 parameters, 1 given i Warning: IntlTimeZone::useDaylightTime(): intltz_use_daylight_time: bad arguments in %s on line %d bool(false) -Fatal error: Argument 1 passed to intltz_use_daylight_time() must be an instance of IntlTimeZone, null given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to intltz_use_daylight_time() must be an instance of IntlTimeZone, null given in %s:%d +Stack trace: +#0 %s(%d): intltz_use_daylight_time(NULL) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/transliterator_create_inverse_error.phpt b/ext/intl/tests/transliterator_create_inverse_error.phpt index 6f6caeffad..bebb3c44c6 100644 --- a/ext/intl/tests/transliterator_create_inverse_error.phpt +++ b/ext/intl/tests/transliterator_create_inverse_error.phpt @@ -18,4 +18,8 @@ Warning: Transliterator::createInverse() expects exactly 0 parameters, 1 given i Warning: Transliterator::createInverse(): transliterator_create_inverse: bad arguments in %s on line %d -Fatal error: Argument 1 passed to transliterator_create_inverse() must be an instance of Transliterator, string given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to transliterator_create_inverse() must be an instance of Transliterator, string given in %s:%d +Stack trace: +#0 %s(%d): transliterator_create_inverse('jj') +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/transliterator_get_error_code_error.phpt b/ext/intl/tests/transliterator_get_error_code_error.phpt index 3d68d20927..f2a0c7dabc 100644 --- a/ext/intl/tests/transliterator_get_error_code_error.phpt +++ b/ext/intl/tests/transliterator_get_error_code_error.phpt @@ -21,4 +21,8 @@ Warning: Transliterator::getErrorCode() expects exactly 0 parameters, 1 given in Warning: Transliterator::getErrorCode(): transliterator_get_error_code: unable to parse input params in %s on line %d -Fatal error: Argument 1 passed to transliterator_get_error_code() must be an instance of Transliterator, array given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to transliterator_get_error_code() must be an instance of Transliterator, array given in %s:%d +Stack trace: +#0 %s(%d): transliterator_get_error_code(Array) +#1 {main} + thrown in %s on line %d diff --git a/ext/intl/tests/transliterator_get_error_message_error.phpt b/ext/intl/tests/transliterator_get_error_message_error.phpt index 5fe89afdb3..8f8f0be9f9 100644 --- a/ext/intl/tests/transliterator_get_error_message_error.phpt +++ b/ext/intl/tests/transliterator_get_error_message_error.phpt @@ -21,4 +21,8 @@ Warning: Transliterator::getErrorMessage() expects exactly 0 parameters, 1 given Warning: Transliterator::getErrorMessage(): transliterator_get_error_message: unable to parse input params in %s on line %d -Fatal error: Argument 1 passed to transliterator_get_error_message() must be an instance of Transliterator, array given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to transliterator_get_error_message() must be an instance of Transliterator, array given in %s:%d +Stack trace: +#0 %s(%d): transliterator_get_error_message(Array) +#1 {main} + thrown in %s on line %d diff --git a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt index b06818901d..ada3c6db48 100644 --- a/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt +++ b/ext/reflection/tests/ReflectionClass_newInstanceArgs_002.phpt @@ -17,4 +17,8 @@ var_dump($a); ?> --EXPECTF-- -Fatal error: Argument 1 passed to ReflectionClass::newInstanceArgs() must be of the type array, string given in %s on line 8 +Fatal error: Uncaught TypeException: Argument 1 passed to ReflectionClass::newInstanceArgs() must be of the type array, string given in %s:8 +Stack trace: +#0 %s(%d): ReflectionClass->newInstanceArgs('x') +#1 {main} + thrown in %s on line 8 diff --git a/ext/spl/tests/iterator_count.phpt b/ext/spl/tests/iterator_count.phpt index a93bf840ba..b70afc18c3 100644 --- a/ext/spl/tests/iterator_count.phpt +++ b/ext/spl/tests/iterator_count.phpt @@ -23,4 +23,8 @@ Warning: iterator_count() expects exactly 1 parameter, 0 given in %s Warning: iterator_count() expects exactly 1 parameter, 2 given in %s -Fatal error: Argument 1 passed to iterator_count() must implement interface Traversable, %unicode_string_optional% given %s +Fatal error: Uncaught TypeException: Argument 1 passed to iterator_count() must implement interface Traversable, string given in %s:%d +Stack trace: +#0 %s(%d): iterator_count('1') +#1 {main} + thrown in %s on line %d diff --git a/ext/spl/tests/iterator_to_array.phpt b/ext/spl/tests/iterator_to_array.phpt index 6ea19cee7f..925ee372d4 100644 --- a/ext/spl/tests/iterator_to_array.phpt +++ b/ext/spl/tests/iterator_to_array.phpt @@ -22,4 +22,8 @@ Warning: iterator_to_array() expects at least 1 parameter, 0 given in %s Warning: iterator_to_array() expects at most 2 parameters, 3 given in %s -Fatal error: Argument 1 passed to iterator_to_array() must implement interface Traversable, %unicode_string_optional% given %s +Fatal error: Uncaught TypeException: Argument 1 passed to iterator_to_array() must implement interface Traversable, string given in %s:%d +Stack trace: +#0 %s(%d): iterator_to_array('test', 'test') +#1 {main} + thrown in %s on line %d diff --git a/ext/standard/tests/file/bug38450_3.phpt b/ext/standard/tests/file/bug38450_3.phpt index a452142384..0193d44d9f 100644 --- a/ext/standard/tests/file/bug38450_3.phpt +++ b/ext/standard/tests/file/bug38450_3.phpt @@ -104,4 +104,9 @@ echo "Done\n"; --EXPECTF-- Warning: fopen(var://myvar): failed to open stream: "VariableStream::stream_open" call failed in %sbug38450_3.php on line %d -Fatal error: Argument 1 passed to VariableStream::__construct() must be of the type array, none given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to VariableStream::__construct() must be of the type array, none given in %s:%d +Stack trace: +#0 [internal function]: VariableStream->__construct() +#1 %s(%d): fopen('var://myvar', 'r+') +#2 {main} + thrown in %s on line %d diff --git a/tests/classes/autoload_009.phpt b/tests/classes/autoload_009.phpt index 7b7e88dd26..2af2d9adc4 100644 --- a/tests/classes/autoload_009.phpt +++ b/tests/classes/autoload_009.phpt @@ -14,7 +14,8 @@ Ensure type hints for unknown types do not trigger autoload. f(new stdClass); ?> --EXPECTF-- - -Fatal error: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s - - +Fatal error: Uncaught TypeException: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(%d): f() +#1 {main} + thrown in %s on line %d diff --git a/tests/classes/interfaces_003.phpt b/tests/classes/interfaces_003.phpt index f95cbc1ef3..0ce8f9e320 100644 --- a/tests/classes/interfaces_003.phpt +++ b/tests/classes/interfaces_003.phpt @@ -23,4 +23,8 @@ $obj = new MyTestClass; ===DONE=== --EXPECTF-- -Fatal error: Argument 1 passed to MyTestClass::__construct() must be an instance of MyObject, none given, called in %sinterfaces_003.php on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to MyTestClass::__construct() must be an instance of MyObject, none given, called in %sinterfaces_003.php:%d +Stack trace: +#0 %s(%d): MyTestClass->__construct() +#1 {main} + thrown in %sinterfaces_003.php on line %d diff --git a/tests/classes/type_hinting_001.phpt b/tests/classes/type_hinting_001.phpt index 5479a4c193..393f157167 100644 --- a/tests/classes/type_hinting_001.phpt +++ b/tests/classes/type_hinting_001.phpt @@ -35,4 +35,8 @@ $a->b($b); ?> --EXPECTF-- -Fatal error: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s on line 12 +Fatal error: Uncaught TypeException: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s:12 +Stack trace: +#0 %s(%d): FooBar->a() +#1 {main} + thrown in %s on line 12 diff --git a/tests/classes/type_hinting_002.phpt b/tests/classes/type_hinting_002.phpt index 7c0581624b..1ebceb4549 100644 --- a/tests/classes/type_hinting_002.phpt +++ b/tests/classes/type_hinting_002.phpt @@ -13,4 +13,8 @@ $o = new Foo; $o->a($o); ?> --EXPECTF-- -Fatal error: Argument 1 passed to Foo::a() must be an instance of NonExisting, instance of Foo given, called in %s on line %d and defined in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to Foo::a() must be an instance of NonExisting, instance of Foo given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(%d): Foo->a() +#1 {main} + thrown in %s on line %d diff --git a/tests/classes/type_hinting_003.phpt b/tests/classes/type_hinting_003.phpt index fbfe0cefeb..d8734b1136 100644 --- a/tests/classes/type_hinting_003.phpt +++ b/tests/classes/type_hinting_003.phpt @@ -57,4 +57,8 @@ array(1) { int(25) } -Fatal error: Argument 1 passed to Test::f1() must be of the type array, integer given, called in %s on line %d and defined in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to Test::f1() must be of the type array, integer given, called in %s on line %d and defined in %s:%d +Stack trace: +#0 %s(%d): Test::f1() +#1 {main} + thrown in %s on line %d diff --git a/tests/lang/bug24658.phpt b/tests/lang/bug24658.phpt index 635eb8cd0c..236d8ed394 100644 --- a/tests/lang/bug24658.phpt +++ b/tests/lang/bug24658.phpt @@ -53,4 +53,9 @@ int(2) object(foo)#%d (0) { } -Fatal error: Argument 1 passed to typehint() must be an instance of foo, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d +Stack trace: +#0 [internal function]: typehint(1) +#1 %s(%d): array_walk(Array, 'typehint') +#2 {main} + thrown in %s on line %d diff --git a/tests/lang/catchable_error_001.phpt b/tests/lang/catchable_error_001.phpt index e3e3692440..f58b26e847 100644 --- a/tests/lang/catchable_error_001.phpt +++ b/tests/lang/catchable_error_001.phpt @@ -19,4 +19,8 @@ Catchable fatal error [1] echo "ALIVE!\n"; ?> --EXPECTF-- -Fatal error: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php on line 5 +Fatal error: Uncaught TypeException: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5 +Stack trace: +#0 %s(%d): blah() +#1 {main} + thrown in %scatchable_error_001.php on line 5 diff --git a/tests/lang/type_hints_001.phpt b/tests/lang/type_hints_001.phpt index 48004ba97f..71ef9f30c3 100644 --- a/tests/lang/type_hints_001.phpt +++ b/tests/lang/type_hints_001.phpt @@ -23,4 +23,8 @@ type_hint_foo($bar); ?> --EXPECTF-- -Fatal error: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s on line 9 +Fatal error: Uncaught TypeException: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s:9 +Stack trace: +#0 %s(%d): type_hint_foo() +#1 {main} + thrown in %s on line 9