mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

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
14 lines
408 B
PHP
14 lines
408 B
PHP
--TEST--
|
|
Testing throw exception doesn't crash with wrong params, variant 2
|
|
--FILE--
|
|
<?php
|
|
|
|
throw new Exception(new stdClass);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught TypeError: Exception::__construct(): Argument #1 ($message) must be of type string, stdClass given in %s:%d
|
|
Stack trace:
|
|
#0 %sexception_019.php(%d): Exception->__construct(Object(stdClass))
|
|
#1 {main}
|
|
thrown in %sexception_019.php on line %d
|