RE: [PHP] use of @ operator to suppress errors

2004-03-15 Thread Ford, Mike [LSS]
On 15 March 2004 12:12, Stuart wrote: > Ben Joyce wrote: > > On the contrary, the @ prefix suppresses all errors for the block of > code it precedes where a block is a function or variable. Essentially > it sets error_reporting to 0 while it evaluates that block. In fact, to be completely accura

Re: [PHP] use of @ operator to suppress errors

2004-03-15 Thread Ben Joyce
: "Ben Joyce" <[EMAIL PROTECTED]> Sent: Monday, March 15, 2004 2:32 PM Subject: Re: [PHP] use of @ operator to suppress errors > - Original Message - > From: Ben Joyce <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, March 15, 2004 2:04

Re: [PHP] use of @ operator to suppress errors

2004-03-15 Thread Ben Joyce
is in my error handling function, ignoring any NOTICE errors, but ideally I'd like to leave it as-is and suppress them when referencing. I'm not sure if I'm making much sense. Any help appreciated! Cheers, Ben - Original Message - From: "Stuart" <[EMAIL PROT

Re: [PHP] use of @ operator to suppress errors

2004-03-15 Thread Ben Joyce
Richard, Tom, and Stuart... thanks for your responses much appreciated. I shall now go and fiddle. Cheers, Ben - Original Message - From: "Tom Meinlschmidt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 15, 2004 12:01 PM Subject: Re: [PHP

Re: [PHP] use of @ operator to suppress errors

2004-03-15 Thread Stuart
Ben Joyce wrote: i'm using error_reporting(0) and set_error_handler("MyErrorHandler") to manage my errors but I'm getting situations where a NOTICE error is thrown. For example if I refer to $_GET['this'] when there is no 'this' querystring key then i get the error. I've tried using @$_GET['this']

Re: [PHP] use of @ operator to suppress errors

2004-03-15 Thread Tom Meinlschmidt
Yes, it's normal. You've to check if is that variable set if (isset($_GET['this'])) and than you didn't get any NOTICE about that undefined variable. condition "if ($_GET['this'])" is not sufficient to check whether is variable set or not. /tom On Mon, 15 Mar 2004 11:43:24 - "Ben Joyce"

Re: [PHP] use of @ operator to suppress errors

2004-03-15 Thread Richard Davey
Hello Ben, Monday, March 15, 2004, 11:43:24 AM, you wrote: BJ> For example if I refer to $_GET['this'] when there is no 'this' querystring BJ> key then i get the error. BJ> I've tried using @$_GET['this'] but it makes no difference. BJ> Is this normal? Yes because @ suppresses the errors on fu

[PHP] use of @ operator to suppress errors

2004-03-15 Thread Ben Joyce
hi. i'm using error_reporting(0) and set_error_handler("MyErrorHandler") to manage my errors but I'm getting situations where a NOTICE error is thrown. For example if I refer to $_GET['this'] when there is no 'this' querystring key then i get the error. I've tried using @$_GET['this'] but it mak