diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-26 15:32:18 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-05 14:25:07 +0200 |
commit | a31f46421d7bf6f55dd9ac5876b8e2eacf7e0708 (patch) | |
tree | 24ffd7c5ae5e321c3994048fdd0fd9f68ae7457c /Zend/tests/exception_009.phpt | |
parent | 528aa7932a839fc6319979c34aa372805d8dc41c (diff) | |
download | php-git-a31f46421d7bf6f55dd9ac5876b8e2eacf7e0708.tar.gz |
Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions
And convert some object to string conversion related recoverable
fatal errors into Error exceptions.
Improve exception safety of internal code performing string
conversions.
Diffstat (limited to 'Zend/tests/exception_009.phpt')
-rw-r--r-- | Zend/tests/exception_009.phpt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Zend/tests/exception_009.phpt b/Zend/tests/exception_009.phpt index 32b048c40b..340bd99eb0 100644 --- a/Zend/tests/exception_009.phpt +++ b/Zend/tests/exception_009.phpt @@ -25,4 +25,8 @@ throw new my_exception; ?> --EXPECT-- -Recoverable fatal error: Object of class stdClass could not be converted to string in Unknown on line 0 +Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in [no active file]:0 +Stack trace: +#0 [internal function]: Exception->__toString() +#1 {main} + thrown in [no active file] on line 0 |