#19073 [Opn->Bgs]: isset returning false positives

From: Date: Fri, 23 Aug 2002 15:20:14 +0000
Subject: #19073 [Opn->Bgs]: isset returning false positives
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-17665@lists.php.net to get a copy of this message
ID: 19073 User updated by: tim@thelogichouse.com Reported By: tim@thelogichouse.com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Red Hat Linux 7.2 PHP Version: 4.2.2 New Comment: The script was written incorrectly. Previous Comments: ------------------------------------------------------------------------ [2002-08-23 11:19:06] tim@thelogichouse.com $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 this bug report at http://bugs.php.net/?id=19073&edit=1

« previous php.bugs (#17665) next »