From: [EMAIL PROTECTED] Operating system: linux PHP version: 4.2.0 PHP Bug Type: Arrays related Bug description: parse error on foreach given array as $_REQUEST['list']
i would like to iterate over the array named $_REQUEST['list'] like this: foreach($_REQUEST['list'] as $user) { if (strlen($user")>$max) die("too long"); } error_log("gettype gives: ". gettype($_REQUEST['list']),0); when php attempts to run this code I get this parse error in my apache log: PHP Parse error: parse error, unexpected '\"' in /var/www/htdocs/tmp.php on line 698 The message I write to the log about the type confirms that the variable is an array. I am currently using 4.2.0rc4 -- Edit bug report at http://bugs.php.net/?id=16684&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16684&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16684&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16684&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16684&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16684&r=support Expected behavior: http://bugs.php.net/fix.php?id=16684&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16684&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16684&r=submittedtwice