Re: small patch for Net_URL
| From: | Stig S. Bakken | Date: | Mon, 29 Apr 2002 05:40:52 +0000 |
| Subject: | Re: small patch for Net_URL | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5872@lists.php.net to get a copy of this message | ||
On Mon, 2002-04-29 at 03:02, Baba Buehler wrote:
>
> I would like to submit this small patch to Net_URL. The problem is that
> Net_URL checks HTTP_SERVER_VARS['HTTPS'], which may or may not exist, and if
> the key 'HTTP' doesn't exist, it throws an error. It is prefixed with a
> '@'
> to prevent error spam, but this doesn't help if you're using your own error
> reporting function.
In your error reporting function you should do:
if (error_reporting() == 0) return;
> I don't think PEAR classes should throw any errors that arn't 'real'
> errors.
Well, in most cases all we can do is silence the statement (the function
throws a warning anyway), so the above test in your error reporting
function is really the only way to go.
- Stig