com php-src: Merge branch 'master' into throwable-interface: UPGRADING Zend/tests/array_type_hint_001.phpt Zend/tests/ bug39003.phpt
Zend/tests/bug42802.php t Zend/tests/bug43332_1.phpt Zend/tests/bug 68446.phpt Zend/tests/closure_027.phpt Zend/tests/ns_071.phpt Zend/tests/ns_072
.phpt Zend/tests/objects_022.phpt Zend/tests/re turn_types/028.phpt Zend/tests/typehints/explicit _weak_include_strict.phpt
Zend/tests/typehints/strict _call_weak.phpt Zend/tes

From: Date: Sun, 14 Jun 2015 23:53:11 +0000
Subject: com php-src: Merge branch 'master' into throwable-interface: UPGRADING Zend/tests/array_type_hint_001.phpt Zend/tests/ bug39003.phpt
Zend/tests/bug42802.php t Zend/tests/bug43332_1.phpt Zend/tests/bug 68446.phpt Zend/tests/closure_027.phpt Zend/tests/ns_071.phpt Zend/tests/ns_072
.phpt Zend/tests/objects_022.phpt Zend/tests/re turn_types/028.phpt Zend/tests/typehints/explicit _weak_include_strict.phpt
Zend/tests/typehints/strict _call_weak.phpt Zend/tes
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87332@lists.php.net to get a copy of this message
Commit: 110e0a5a2cda3bfa7778bb871502ff2b50e59f76 Author: Aaron Piotrowski <aaron@trowski.com> Sun, 14 Jun 2015 18:53:11 -0500 Parents: 5c54bf015dc4fd930394709d80665d9a731f6f99 6cb7b48846d129f088b50c4a8c4b00b7dc886f5c Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=110e0a5a2cda3bfa7778bb871502ff2b50e59f76 Log: Merge branch 'master' into throwable-interface # Conflicts: # Zend/zend_language_scanner.c # Zend/zend_language_scanner.l # ext/simplexml/tests/SimpleXMLElement_xpath.phpt Changed paths: MM UPGRADING MM Zend/tests/array_type_hint_001.phpt MM Zend/tests/bug39003.phpt MM Zend/tests/bug42802.phpt MM Zend/tests/bug43332_1.phpt MM Zend/tests/bug68446.phpt MM Zend/tests/closure_027.phpt MM Zend/tests/ns_071.phpt MM Zend/tests/ns_072.phpt MM Zend/tests/objects_022.phpt AM Zend/tests/return_types/028.phpt MM Zend/tests/typehints/explicit_weak_include_strict.phpt MM Zend/tests/typehints/strict_call_weak.phpt MM Zend/tests/typehints/strict_call_weak_explicit.phpt MM Zend/tests/typehints/weak_include_strict.phpt MM Zend/tests/variadic/typehint_error.phpt MM Zend/zend.c MM Zend/zend_exceptions.c MM Zend/zend_language_scanner.c MM Zend/zend_language_scanner.l AM ext/spl/tests/bug69737.phpt AM ext/tokenizer/tests/token_get_all_TOKEN_PARSE_000.phpt MM tests/classes/autoload_009.phpt MM tests/classes/type_hinting_001.phpt MM tests/classes/type_hinting_002.phpt MM tests/classes/type_hinting_003.phpt MM tests/lang/bug24658.phpt MM tests/lang/catchable_error_001.phpt MM tests/lang/type_hints_001.phpt

diff --cc Zend/tests/array_type_hint_001.phpt index 474ffa8,bad7246..2b473c5 --- a/Zend/tests/array_type_hint_001.phpt +++ b/Zend/tests/array_type_hint_001.phpt @@@ -12,8 -12,8 +12,8 @@@ foo(123) --EXPECTF-- 3 -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): foo(123) #1 {main} thrown in %sarray_type_hint_001.php on line 2 diff --cc Zend/tests/bug39003.phpt index f4f9e4d,87cce6f..add1451 --- a/Zend/tests/bug39003.phpt +++ b/Zend/tests/bug39003.phpt @@@ -21,8 -21,8 +21,8 @@@ test($obj) echo "Done\n"; ?> --EXPECTF-- -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): test(Object(ClassName)) #1 {main} thrown in %s on line %d diff --cc Zend/tests/bug42802.phpt index 6dad5fe,9b7482f..3b00408 --- a/Zend/tests/bug42802.phpt +++ b/Zend/tests/bug42802.phpt @@@ -37,8 -37,8 +37,8 @@@ o ok ok -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): foo\test5(Object(foo\bar)) #1 {main} thrown in %sbug42802.php on line %d diff --cc Zend/tests/bug43332_1.phpt index 5fe734c,ce4ce52..fc035ab --- a/Zend/tests/bug43332_1.phpt +++ b/Zend/tests/bug43332_1.phpt @@@ -12,8 -12,8 +12,8 @@@ $foo = new foo $foo->bar($foo); // Ok! $foo->bar(new \stdclass); // Error, ok! --EXPECTF-- -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): foobar\foo->bar(Object(stdClass)) #1 {main} thrown in %sbug43332_1.php on line 5 diff --cc Zend/tests/bug68446.phpt index 2dad15d,a9507b8..994699e --- a/Zend/tests/bug68446.phpt +++ b/Zend/tests/bug68446.phpt @@@ -32,9 -32,9 +32,9 @@@ array(1) int(1) } -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): a(NULL) #1 {main} thrown in %s on line %d diff --cc Zend/tests/closure_027.phpt index a56b780,0b604c3..db42ae9 --- a/Zend/tests/closure_027.phpt +++ b/Zend/tests/closure_027.phpt @@@ -28,8 -28,8 +28,8 @@@ Notice: Undefined variable: y in %s on Warning: Missing argument 1 for {closure}(), called in %s on line %d and defined in %s on line %d NULL -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): test(Object(stdClass)) #1 {main} thrown in %s on line %d diff --cc Zend/tests/ns_071.phpt index 53ff7f0,7dbca07..2f2fcfa --- a/Zend/tests/ns_071.phpt +++ b/Zend/tests/ns_071.phpt @@@ -18,8 -18,8 +18,8 @@@ new bar(new \stdclass) --EXPECTF-- NULL -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): foo\bar->__construct(Object(stdClass)) #1 {main} thrown in %s on line %d diff --cc Zend/tests/ns_072.phpt index 877095d,c797cf0..6375682 --- a/Zend/tests/ns_072.phpt +++ b/Zend/tests/ns_072.phpt @@@ -30,8 -30,8 +30,8 @@@ object(foo\test)#%d (0) } NULL -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): foo\bar->__construct(Object(stdClass)) #1 {main} thrown in %s on line %d diff --cc Zend/tests/objects_022.phpt index 913de7d,982b2d1..01f961b --- a/Zend/tests/objects_022.phpt +++ b/Zend/tests/objects_022.phpt @@@ -36,8 -36,8 +36,8 @@@ object(bar)#%d (0) object(baz)#%d (0) { } -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): foo->testFoo(Object(stdClass)) #1 {main} thrown in %s on line %d diff --cc Zend/tests/return_types/028.phpt index 0000000,d820b25..d2a78ed mode 000000,100644..100644 --- a/Zend/tests/return_types/028.phpt +++ b/Zend/tests/return_types/028.phpt @@@ -1,0 -1,20 +1,20 @@@ + --TEST-- + Memory leak when returning TMP/VAR with wrong return type + --FILE-- + <?php + + function foo(): stdClass { + $a = new stdClass; + $b = []; + return [$a, $b]; + } + + try { + foo(); -} catch (BaseException $e) { ++} catch (Error $e) { + print $e->getMessage(); + } + + ?> + --EXPECTF-- + Return value of foo() must be an instance of stdClass, array returned in %s on line %d diff --cc Zend/tests/typehints/explicit_weak_include_strict.phpt index 1593c70,579ebcb..fb53d8c --- a/Zend/tests/typehints/explicit_weak_include_strict.phpt +++ b/Zend/tests/typehints/explicit_weak_include_strict.phpt @@@ -11,9 -11,9 +11,9 @@@ require 'weak_include_strict_2.inc' // calls within that file should stay strict, despite being included by weak file ?> --EXPECTF-- -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): takes_int(1) #1 %s(%d): require('%s') #2 {main} thrown in %sweak_include_strict_2.inc on line 5 diff --cc Zend/tests/typehints/strict_call_weak.phpt index 8ebed22,5031644..e3a606e --- a/Zend/tests/typehints/strict_call_weak.phpt +++ b/Zend/tests/typehints/strict_call_weak.phpt @@@ -13,9 -13,9 +13,9 @@@ require 'strict_call_weak_2.inc' function_declared_in_weak_mode(1.0); ?> --EXPECTF-- -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): function_declared_in_weak_mode(1) #1 {main} thrown in %sstrict_call_weak_2.inc on line 5 diff --cc Zend/tests/typehints/strict_call_weak_explicit.phpt index 215a0b1,37f527b..22c5b43 --- a/Zend/tests/typehints/strict_call_weak_explicit.phpt +++ b/Zend/tests/typehints/strict_call_weak_explicit.phpt @@@ -13,9 -13,9 +13,9 @@@ require 'strict_call_weak_explicit_2.in function_declared_in_weak_mode(1.0); ?> --EXPECTF-- -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): function_declared_in_weak_mode(1) #1 {main} thrown in %sstrict_call_weak_explicit_2.inc on line 5 diff --cc Zend/tests/typehints/weak_include_strict.phpt index 5cd1895,da7c7a4..e49485d --- a/Zend/tests/typehints/weak_include_strict.phpt +++ b/Zend/tests/typehints/weak_include_strict.phpt @@@ -11,9 -11,9 +11,9 @@@ require 'weak_include_strict_2.inc' // calls within that file should stay strict, despite being included by weak file ?> --EXPECTF-- -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): takes_int(1) #1 %s(%d): require('%s') #2 {main} thrown in %sweak_include_strict_2.inc on line 5 diff --cc Zend/tests/variadic/typehint_error.phpt index 9f9a97b,2cbe2f3..26842bb --- a/Zend/tests/variadic/typehint_error.phpt +++ b/Zend/tests/variadic/typehint_error.phpt @@@ -33,8 -33,8 +33,8 @@@ array(3) } } -Fatal error: Uncaught TypeException: Argument 3 passed to test() must be of the type array, integer given, called in %s:%d +Fatal error: Uncaught TypeError: 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) + #0 %s(%d): test(Array, Array, 2) #1 {main} thrown in %s on line %d diff --cc Zend/zend_exceptions.c index 422c4bb,e8c0706..ae55c1f --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@@ -38,11 -39,6 +38,11 @@@ static zend_class_entry *type_error_ce static zend_object_handlers default_exception_handlers; ZEND_API void (*zend_throw_exception_hook)(zval *ex); - static zend_class_entry *zend_get_exception_base(zval *object) ++static inline zend_class_entry *zend_get_exception_base(zval *object) +{ + return instanceof_function(Z_OBJCE_P(object), default_exception_ce) ? default_exception_ce : error_ce; +} + void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) { zval tmp, *previous, zv, *pzv, rv; @@@ -569,11 -556,8 +569,11 @@@ ZEND_METHOD(exception, getTraceAsString uint32_t num = 0; DEFAULT_0_PARAMS; + + object = getThis(); + base_ce = zend_get_exception_base(object); - trace = zend_read_property(base_ce, getThis(), "trace", sizeof("trace")-1, 1, &rv); - trace = zend_read_property(base_exception_ce, getThis(), "trace", sizeof("trace")-1, 1, &rv); ++ trace = zend_read_property(base_ce, object, "trace", sizeof("trace")-1, 1, &rv); if (Z_TYPE_P(trace) != IS_ARRAY) { RETURN_FALSE; } diff --cc Zend/zend_language_scanner.c index e3b2de1,63d1948..6813cf4 --- a/Zend/zend_language_scanner.c +++ b/Zend/zend_language_scanner.c @@@ -2720,8 -2743,8 +2743,8 @@@ yy136 * Because the lexing itself doesn't do that for us */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE); + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); - return T_ERROR; + RETURN_TOKEN(T_ERROR); } } else { errno = 0; @@@ -2736,17 -2759,17 +2759,17 @@@ } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); - return T_ERROR; + RETURN_TOKEN(T_ERROR); } ZEND_ASSERT(!errno); - return T_DNUMBER; + RETURN_TOKEN(T_DNUMBER); } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE); + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); - return T_ERROR; + RETURN_TOKEN(T_ERROR); } } ZEND_ASSERT(!errno); diff --cc Zend/zend_language_scanner.l index 1204287,cde0621..01c489c --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@@ -1635,8 -1658,8 +1658,8 @@@ NEWLINE ("\r"|"\n"|"\r\n" * Because the lexing itself doesn't do that for us */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE); + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); - return T_ERROR; + RETURN_TOKEN(T_ERROR); } } else { errno = 0; @@@ -1651,17 -1674,17 +1674,17 @@@ } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); - return T_ERROR; + RETURN_TOKEN(T_ERROR); } ZEND_ASSERT(!errno); - return T_DNUMBER; + RETURN_TOKEN(T_DNUMBER); } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE); + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); - return T_ERROR; + RETURN_TOKEN(T_ERROR); } } ZEND_ASSERT(!errno); diff --cc ext/spl/tests/bug69737.phpt index 0000000,fd8bba6..02815c2 mode 000000,100644..100644 --- a/ext/spl/tests/bug69737.phpt +++ b/ext/spl/tests/bug69737.phpt @@@ -1,0 -1,21 +1,21 @@@ + --TEST-- + Bug #69737 (Segfault when SplMinHeap::compare produces fatal error) + --FILE-- + <?php + class SplMinHeap1 extends SplMinHeap { + public function compare($a, $b) { + return -parent::notexist($a, $b); + } + } + $h = new SplMinHeap1(); + $h->insert(1); + $h->insert(6); + ?> + ===DONE=== + --EXPECTF-- -Fatal error: Uncaught EngineException: Call to undefined method SplMinHeap::notexist() in %s%ebug69737.php:%d ++Fatal error: Uncaught Error: Call to undefined method SplMinHeap::notexist() in %s%ebug69737.php:%d + Stack trace: + #0 [internal function]: SplMinHeap1->compare(1, 6) + #1 %s%ebug69737.php(%d): SplHeap->insert(6) + #2 {main} + thrown in %s%ebug69737.php on line %d diff --cc ext/tokenizer/tests/token_get_all_TOKEN_PARSE_000.phpt index 0000000,03b991b..b9da915 mode 000000,100644..100644 --- a/ext/tokenizer/tests/token_get_all_TOKEN_PARSE_000.phpt +++ b/ext/tokenizer/tests/token_get_all_TOKEN_PARSE_000.phpt @@@ -1,0 -1,19 +1,19 @@@ + --TEST-- + Parse errors during token_get_all() with TOKEN_PARSE flag + --SKIPIF-- + <?php if (!extension_loaded("tokenizer")) print "skip"; ?> + --FILE-- + <?php + + try { + token_get_all('<?php invalid code;', TOKEN_PARSE); -} catch (ParseException $e) { ++} catch (ParseError $e) { + echo $e->getMessage(), PHP_EOL; + } + + echo "Done"; + + ?> + --EXPECT-- + syntax error, unexpected 'code' (T_STRING) + Done diff --cc tests/classes/autoload_009.phpt index 51d3e8f,b25d7eb..150f3ec --- a/tests/classes/autoload_009.phpt +++ b/tests/classes/autoload_009.phpt @@@ -14,8 -14,8 +14,8 @@@ Ensure type hints for unknown types do f(new stdClass); ?> --EXPECTF-- -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): f(Object(stdClass)) #1 {main} thrown in %s on line %d diff --cc tests/classes/type_hinting_001.phpt index d941229,da3de46..28d1280 --- a/tests/classes/type_hinting_001.phpt +++ b/tests/classes/type_hinting_001.phpt @@@ -35,8 -35,8 +35,8 @@@ $a->b($b) ?> --EXPECTF-- -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): FooBar->a(Object(Blort)) #1 {main} thrown in %s on line 12 diff --cc tests/classes/type_hinting_002.phpt index 7486824,1988e24..6fefcc8 --- a/tests/classes/type_hinting_002.phpt +++ b/tests/classes/type_hinting_002.phpt @@@ -13,8 -13,8 +13,8 @@@ $o = new Foo $o->a($o); ?> --EXPECTF-- -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): Foo->a(Object(Foo)) #1 {main} thrown in %s on line %d diff --cc tests/classes/type_hinting_003.phpt index 6038f25,a58c579..50de31e --- a/tests/classes/type_hinting_003.phpt +++ b/tests/classes/type_hinting_003.phpt @@@ -57,8 -57,8 +57,8 @@@ array(1) int(25) } -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): Test::f1(1) #1 {main} thrown in %s on line %d diff --cc tests/lang/bug24658.phpt index 6229d52,6e57d9b..b089569 --- a/tests/lang/bug24658.phpt +++ b/tests/lang/bug24658.phpt @@@ -53,9 -53,9 +53,9 @@@ int(2 object(foo)#%d (0) { } -Fatal error: Uncaught TypeException: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d +Fatal error: Uncaught TypeError: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d Stack trace: - #0 [internal function]: typehint(1) + #0 [internal function]: typehint(1, 1) #1 %s(%d): array_walk(Array, 'typehint') #2 {main} thrown in %s on line %d diff --cc tests/lang/catchable_error_001.phpt index e63e0d7,4343ac0..b11a7c8 --- a/tests/lang/catchable_error_001.phpt +++ b/tests/lang/catchable_error_001.phpt @@@ -19,8 -19,8 +19,8 @@@ Catchable fatal error [1 echo "ALIVE!\n"; ?> --EXPECTF-- -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): blah(Object(stdClass)) #1 {main} thrown in %scatchable_error_001.php on line 5 diff --cc tests/lang/type_hints_001.phpt index d487a86,0a061b7..e8a2ffa --- a/tests/lang/type_hints_001.phpt +++ b/tests/lang/type_hints_001.phpt @@@ -23,8 -23,8 +23,8 @@@ type_hint_foo($bar) ?> --EXPECTF-- -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 +Fatal error: Uncaught TypeError: 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() + #0 %s(%d): type_hint_foo(Object(Bar)) #1 {main} thrown in %s on line 9
« previous php.cvs (#87332) next »