From: spencer dot rinehart at dominionenterprises dot com Operating system: Fedora 8/Linux PHP version: 5.2.5 PHP Bug Type: Strings related Bug description: Isset fails on using a string as a multidimensional array
Description: ------------ isset throws a fatal error when passing a string offset as an array of depth 3 or more when expected behavior would be it returning false. Reproduce code: --------------- $string=''; if(isset($string['test']['test'])) echo "true\n"; else echo "false\n"; if(isset($string['test']['test']['test'])) echo "true\n"; else echo "false\n"; Expected result: ---------------- false false Actual result: -------------- false PHP Fatal error: Cannot use string offset as an array in /home/anubis/test.php on line 8 -- Edit bug report at http://bugs.php.net/?id=44431&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44431&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44431&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44431&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44431&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44431&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44431&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44431&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44431&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44431&r=support Expected behavior: http://bugs.php.net/fix.php?id=44431&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44431&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44431&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44431&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44431&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44431&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44431&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44431&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44431&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44431&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44431&r=mysqlcfg