-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
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
Ignore/hide Notices in logs using error_reporting() #1080
Comments
we're reporting everything to Debug Output window in .NET |
Right. And I believe this also goes all to the logs even on production which is a problem when you have millions of unwanted notices and you don't want to spend months adapting legacy code (specially when it's not yours) or when having undefined variables is your coding style choice and the reason you love PHP. BTW, there is a flame war in the PHP community regarding the imposed coding style since version 8: About 40% of the developers considered it a bad decision, very disrespectful and/or that PHP's simplicity was destroyed. As a workaround, some developers suggested 1) to disable logging notices using This workaround is not working in Peachpie, becauses 1) My suggestion is to implement both to avoid forks, because even when 60% is bigger than 40%, that's not a reason to crash them (force them to rewrite their legacy code instead of simply solve it with a single configuration option). |
Is there any option to ignore/hide the Notices (showing in VSCode debug window)?
This code should work:
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT);
The text was updated successfully, but these errors were encountered: