Re: [patch] error masks
| From: | Steven Van Poeck | Date: | Mon, 31 Aug 2009 06:10:14 +0000 |
| Subject: | Re: [patch] error masks | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-45437@lists.php.net to get a copy of this message | ||
Rasmus Lerdorf wrote:
There will always be a reason to not report certain types of errors. E_STRICT and E_DEPRECATED are informative development-level messages that have no place on a production system. They should be turned off. The actual real problem is that our error mechanism only allows us to turn off the final output stage, but not the actual generation of those errors. That is the real issue. I do agree that having another ini switch isn't ideal, but I have pondered this a few times and I don't see a solution that doesn't involve some sort of configuration like that because of custom error handlers and the php_errormsg issues. -RasmusHello, Then why not use a function instead ? Or extend error_reporting() to support Stas' proposal ? That way: - the end-user will be able to activate the mask on a per-script basis - it *will* take him/her time and effort to entirely suppress error handling on a 3rd party app - which might incite him/her to actually fix the errors instead - it will not affect other apps running on the same server (ever thought about shared hosting with the ini switch ?) - any decent programmer will find a "clean" way to activate the feature for his entire app in production if this is desirable In the documentation then, there'd be this big red warning box explaining the bad mojo stuff... On a personal note, I'm in favour of this patch: what's the sense of processing errors if they don't get printed out anywhere ? Just my 2¢ Steven