You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If no errors appear, repeat running the script and pressing Ctrl-C.
The error I get is:
Warning: Uncaught Error: Object of class UnwindExit could not be converted to string in /tmp/test/a.php:2
Stack trace:
#0 /tmp/test/test.php(4): require()
#1 /tmp/test/test.php(14): {closure}('a')
#2 {main}
thrown in /tmp/test/a.php on line 2
Fatal error: During class fetch: Uncaught in /tmp/test/a.php on line 2
I believe the error comes up when the script is killed while one of the classes is being loaded.
Please let me know if I can provide more information to narrow it down.
Thanks for your help.
PHP Version
PHP 8.2.8 and PHP 8.3.0 Beta 1
Operating System
Linux
The text was updated successfully, but these errors were encountered:
When the exit; line is executed, an internal UnwindExit exception is thrown.
This happens during the linking of class a where it tries to link to trait b.
However, linking to b fails and this causes report_class_fetch_error to be called. In report_class_fetch_error the check for EG(exception) will succeed because an instance of ce_unwind_exit is stored in there. In zend_exception_uncaught_error it tries to convert the exception to a string, which fails because UnwindExit doesn't have a way to convert it to a string, leading to the strange combination of warning + fatal error you see.
I have a similar error in Symfony Messenger consume process. Is there any news about it? does it require some investigation in the application source code or is it something to fix in the PHP source?
Description
I am running PHP 8.2.8 and PHP 8.3.0 Beta 1, and at times, I get this error when killing a cli script:
Object of class UnwindExit could not be converted to string
It's been tricky to reproduce, but I can intermittently get the error by:
If no errors appear, repeat running the script and pressing Ctrl-C.
The error I get is:
I believe the error comes up when the script is killed while one of the classes is being loaded.
Please let me know if I can provide more information to narrow it down.
Thanks for your help.
PHP Version
PHP 8.2.8 and PHP 8.3.0 Beta 1
Operating System
Linux
The text was updated successfully, but these errors were encountered: