Re: use of @ operator to suppress errors

From: Date: Mon, 15 Mar 2004 12:01:02 +0000
Subject: Re: use of @ operator to suppress errors
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-180429@lists.php.net to get a copy of this message
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 --

« previous php.general (#180429) next »