mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
fbe30592d6
From now on, we always display the given object's type instead of just reporting "object". Additionally, make the format of return type errors match the format of argument errors. Closes GH-5625
16 lines
425 B
PHP
16 lines
425 B
PHP
--TEST--
|
|
Testing throw exception doesn't crash with wrong params, variant 3
|
|
--FILE--
|
|
<?php
|
|
|
|
class Hello extends Error {}
|
|
throw new Hello(new stdClass);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught TypeError: Error::__construct(): Argument #1 ($message) must be of type string, stdClass given in %s:%d
|
|
Stack trace:
|
|
#0 %sexception_021.php(%d): Error->__construct(Object(stdClass))
|
|
#1 {main}
|
|
thrown in %sexception_021.php on line %d
|