Re: [patch] error masks
| From: | Daniel Convissor | Date: | Tue, 25 Aug 2009 03:09:25 +0000 |
| Subject: | Re: [patch] error masks | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-45382@lists.php.net to get a copy of this message | ||
Hi Stas:
On Mon, Aug 24, 2009 at 12:59:55PM -0700, Stanislav Malyshev wrote:
>
> Just search for @fopen or @include or
> @xml or @eval - tons of examples.
True. But this patch could cause problems.
@ is often used to stop error/warning output to the browser on that line,
but the next couple lines of code are used to handle that error. For
example:
if (!($dom = @DOMDocument::load($file_name))) {
log_it('invalid XML: ' . $php_errormsg);
die('invalid XML');
}
So if error processing is totally turned off, $php_errormsg won't be
populated.
I like the general idea, but I'm encouraging folks to carefully consider
the ramifications of various implementation methods.
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409