-
Notifications
You must be signed in to change notification settings - Fork 2
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
Testing phperror.net #4
Comments
Thanks Daniel! I think that fatal errors cannot be stopped, but that is a good thing (at least I think it is). If a plugin is fataling, you need to know that. This plugin should basically "clean up" the error reporting so that you can more easily spot errors related to code that you are working on. As such, I think this is the expected result. Can you give it a try with non-fatal errors? This scenario would interest me: Plugin A: has notices, but is set to NOT show notices. Are notices hidden? If that is working, then all is good. I appreciate you helping out with this! On Friday, November 23, 2012 at 11:17 AM, Daniel Dvorkin wrote:
|
Agreed on fatals. And I'm on the fence with warnings. Ignoring them could end up biting you in the arse. But totally get the raison d'etre of this and it was really needed! So props on doing it. It works as it should without phperror.net. While using phperror.net your plugin becomes ineffective, as much as the notices are still showing as if you're plugin wasn't there. |
Thanks! Good to know! I thought it might work given that it works flawlessly with Xdebug which overrides the error reporting. I guess this gives me a good reason to test out phperror.net! There is a lot to the It also still allows errors to display in Debug Bar, so this issue may be related to #1. On Friday, November 23, 2012 at 11:59 AM, Daniel Dvorkin wrote:
|
Well, I guess most users of this plugin will also use Debug Bar (and I hope phperror.php because it kick ass), so it's not minor. phperror does some funky things. In the 3.4.2 admin is throwing a lot of strict notices (which core deactivates by default), so it's probably ignoring php config and doing it's own thing. Because of that, they have in the setup options a 'wordpress' => true option (https://github.com/JosephLenton/PHP-Error/wiki/Options). Maybe checking what this option does will show you the way. |
Good idea! I'll look! Definitely don't see it as trivial especially as there are likely other similar scripts that override the default error reporting. |
Skype me @ MZAWeb if you need me to test anything Cheers |
Which of the methods of initiating phperror.net do you use? I'm having a heck of a time getting this plugin to work with it. I installed phperror.net and do see that it is a marvelous thing, but it's nearly useless without being able to silence some errors. As such, I'd like to get this working for it. |
I'm just adding require( ABSPATH . '/php_error.php' ); at the top of my functions.php I must say, I'm starting to like its unforgiveness. It forces me to deal early with notices both in my code and in the third party plugins I'm using. Having said that, I can see some sites where being able to mute some plugins would be priceless. I need to run now, but I'll take a stab at it tonight, to see if I can help. |
Got to play with this for a bit and I have a working version... not really pretty, though. Sending you a pull request so you can take a look. As I guess you don't want to ship php_error.net code inside your plugin, it needs for you to require( 'php_error.php' ) before the Struthio_Camelus __construct (i just included it at the top of the __construct for testing) |
Awesome! I'll take a look. Have you considered setting up a plugin that enables phperror.net? If so, I would SO be willing to work with you to make sure Ostrichcize plays nice with it. |
Making a plugin should be easy and quick. Will take a stab tomorrow. |
Hey, sorry, complicated week. Really quick first pass, but gets the job done: https://github.com/MZAWeb/wp-phperror-net |
Test code: https://gist.github.com/4136893
Without phperror.net script, it doesn't show the notice and warning, but dies on the fatal (which I think it's the intended behaviour).
With phperror.net, unfortunately still dies with the notice.
The text was updated successfully, but these errors were encountered: