Re: use of @ operator to suppress errors

From: Date: Mon, 15 Mar 2004 12:11:03 +0000
Subject: Re: use of @ operator to suppress errors
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-180432@lists.php.net to get a copy of this message
Richard, Tom, and Stuart... thanks for your responses much appreciated. I shall now go and fiddle. Cheers, Ben ----- Original Message ----- From: "Tom Meinlschmidt" <tomas@meinlschmidt.org> To: <php-general@lists.php.net> Sent: Monday, March 15, 2004 12:01 PM Subject: Re: [PHP] use of @ operator to suppress errors > 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 -0000 > "Ben Joyce" <ben.php-general@babelfish.co.uk> wrote: > > > 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 makes no difference. > > > > Is this normal? > > > > Thanks in advance. > > > > Ben > > > > p.s. PHP 4.3.4 on Windows 2003 > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#180432) next »