Bug #18202: suppressing errors with "@"

From: Date: Sat, 06 Jul 2002 21:24:37 +0000
Subject: Bug #18202: suppressing errors with "@"
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13330@lists.php.net to get a copy of this message
From: webmaster@speedy.co.il Operating system: Red Hat Linux 7.3 PHP version: 4.1.2 PHP Bug Type: Unknown/Other Function Bug description: suppressing errors with "@" Hi, I tried to suppress warnings in isset expressions (Uninitialized string offset warnings). The original line was something like this: if (!(isset($GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME']))) When I added the "@" sign like this: if (!(isset(@$GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME']))) My program stopped working, and I got errors like: PHP Parse error: parse error, expecting T_VARIABLE' or '$'' .... Eventually, I put the "@" in this place: if (!(@isset($GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME']))) Which works, but why didn't it work the other way? Is it some kind of PHP bug? I'm using PHP Version 4.1.2 Thanks, Uri Even-Chen Speedy Software Raanana, Israel. -------------------------------------------------------- Welcome to Speedy Net (In Hebrew): http://www.speedy.co.il/ Speedy Dating (In Hebrew): http://dating.speedy.co.il/ Speedy Composer (In English): http://www.speedy.co.il/composer/ -------------------------------------------------------- -- Edit bug report at http://bugs.php.net/?id=18202&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18202&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18202&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18202&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18202&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18202&r=support Expected behavior: http://bugs.php.net/fix.php?id=18202&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18202&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18202&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18202&r=globals

« previous php.bugs (#13330) next »