We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to http://php.net/manual/en/function.register-shutdown-function.php,
If you call exit() within one registered shutdown function, processing will stop completely and no other registered shutdown functions will be called.
In Yii sources:
yii2/framework/base/ErrorHandler.php
Line 207 in a2568d1
Why this exit(1) is necessary here? It prevents other shutdown function calls!
exit(1)
The text was updated successfully, but these errors were encountered:
exit(1) is necessary to send response code 1 to console if application is run in command line.
1
Sorry, something went wrong.
php itself will return 255 on fatal error:
<?php function handleFatalError() { echo __FUNCTION__."\n"; } register_shutdown_function('handleFatalError'); callToUndefinedFunction();
$ php ./shutdown.php Fatal error: Call to undefined function callToUndefinedFunction() in /Volumes/work/warehouse/shutdown.php on line 17 Call Stack: 0.0002 226712 1. {main}() /Volumes/work/warehouse/shutdown.php:0 handleFatalError $ echo $? 255
Isn't it work for us?
exit(1) is important for tools like gulp & grunt. If you have any alternative fixes in mind, feel free to do a suggestion
No branches or pull requests
According to http://php.net/manual/en/function.register-shutdown-function.php,
In Yii sources:
yii2/framework/base/ErrorHandler.php
Line 207 in a2568d1
Why this
exit(1)
is necessary here? It prevents other shutdown function calls!The text was updated successfully, but these errors were encountered: