-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Error Handler Broken #87
Comments
@dotsam: Thanks a lot for your workaround. add_action('after_setup_theme', function () {
$previous_handler = set_error_handler(null);
}); The rest of your workaround code still seems to have issues handling |
@strarsis Thank you! I was receiving white screens in production (with no errors or logs) with every change in post status: publish, trash, etc. No issues in staging or development. In my case, I tracked it down specifically to Adding this snippet fixed the issue in production: add_action('after_setup_theme', function () {
if (! defined('WP_DEBUG') || WP_DEBUG === false) {
$previous_handler = set_error_handler(null);
}
}); |
It looks like master is already on 2.0 now, which doesn't have this issue, but wanted to raise it in case there is to be a maintenance release of the 1.x series, and to let others know about it.
#58 was to add functionality to ignore certain classes of error, adding the following code:
acorn/src/Acorn/Bootstrap/HandleExceptions.php
Lines 186 to 197 in fa60ba1
But from what I can see, this code doesn't work. It's checking if
ErrorException
is an instance of'E_USER_DEPRECATED'
, which I don't believe will ever work. Something like:is what I can come up with to get this to work as designed.
My workaround in a Sage 10 theme with Acorn v1.1.0 is to check if the Acorn error handler is the one registered, and if so, replace it with one that unconditionally throws an ErrorException
The text was updated successfully, but these errors were encountered: