#19073 [NEW]: isset returning false positives

From: Date: Fri, 23 Aug 2002 15:19:06 +0000
Subject: #19073 [NEW]: isset returning false positives
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-17664@lists.php.net to get a copy of this message
From: tim@thelogichouse.com Operating system: Red Hat Linux 7.2 PHP version: 4.2.2 PHP Bug Type: Variables related Bug description: isset returning false positives $x = ""; if (isset($x)) print "X is set\n"; if (isset($y)); print "Y is set\n"; if (strlen($x) > 0) print "X is set (SL)\n"; if (strlen($y) > 0) print "Y is set (SL)\n"; ### The following script should at best print 'X is Set' because $x has been set to "". However This is my output: X is set Y is set $y is nowhere defined in the script, yet isset returns it as set. Please feel free to contact if you need any more info. Timothy M. Crider -- Edit bug report at http://bugs.php.net/?id=19073&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19073&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19073&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19073&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19073&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19073&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19073&r=support Expected behavior: http://bugs.php.net/fix.php?id=19073&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19073&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19073&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19073&r=globals

« previous php.bugs (#17664) next »