Bug #16684: parse error on foreach given array as $_REQUEST['list']

From: Date: Thu, 18 Apr 2002 16:18:00 +0000
Subject: Bug #16684: parse error on foreach given array as $_REQUEST['list']
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-5314@lists.php.net to get a copy of this message
From: bob@mroczka.com 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

« previous php.bugs (#5314) next »