#29883 [NEW]: isset gives invalid values on strings

From: Date: Sun, 29 Aug 2004 11:11:16 +0000
Subject: #29883 [NEW]: isset gives invalid values on strings
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65414@lists.php.net to get a copy of this message
From: tomas_matousek at hotmail dot com Operating system: WinXP PHP version: 5.0.1 PHP Bug Type: Scripting Engine problem Bug description: isset gives invalid values on strings Description: ------------ isset applied on a string with negative index returns true. It should return false. Reproduce code: --------------- $x = "bug"; var_dump(isset($x[-1])); Expected result: ---------------- bool(false) Actual result: -------------- bool(true) -- Edit bug report at http://bugs.php.net/?id=29883&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29883&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29883&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29883&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=29883&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29883&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29883&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29883&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29883&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29883&r=support Expected behavior: http://bugs.php.net/fix.php?id=29883&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29883&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29883&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29883&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29883&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29883&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29883&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29883&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29883&r=float

« previous php.bugs (#65414) next »