Skip to content

Commit

Permalink
Display TypeExceptions like normal exceptions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nikic committed May 17, 2015
1 parent 3ae995f commit 440481f
Show file tree
Hide file tree
Showing 81 changed files with 412 additions and 89 deletions.
6 changes: 5 additions & 1 deletion Zend/tests/array_type_hint_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/bug33996.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/bug39003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/bug42802.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/bug43332_1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/bug55705.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/bug68446.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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

6 changes: 5 additions & 1 deletion Zend/tests/closure_027.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/ns_071.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/ns_072.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/objects_022.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/return_types/001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/return_types/002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/return_types/003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/return_types/004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/return_types/005.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/return_types/010.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/return_types/013.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/return_types/rfc001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/return_types/rfc003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 6 additions & 1 deletion Zend/tests/typehints/explicit_weak_include_strict.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/typehints/scalar_constant_defaults_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
6 changes: 5 additions & 1 deletion Zend/tests/typehints/strict_call_weak.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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

6 changes: 5 additions & 1 deletion Zend/tests/typehints/strict_call_weak_explicit.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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

7 changes: 6 additions & 1 deletion Zend/tests/typehints/weak_include_strict.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Zend/tests/variadic/typehint_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 8 additions & 6 deletions Zend/zend_exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 5 additions & 1 deletion ext/date/tests/014.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion ext/intl/tests/calendar_add_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion ext/intl/tests/calendar_clear_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion ext/intl/tests/calendar_fieldDifference_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion ext/intl/tests/calendar_getDayOfWeekType_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion ext/intl/tests/calendar_getErrorCode_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion ext/intl/tests/calendar_getErrorMessage_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion ext/intl/tests/calendar_getLocale_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading

0 comments on commit 440481f

Please sign in to comment.