From: kyle dot grieser-c at iovation dot com Operating system: linux PHP version: 4.3.11 PHP Bug Type: Variables related Bug description: single POST variable is corrupted
Description: ------------ A form of type POST that contains a single form element will corrupt the incoming value. What I get is this: formvalue="valueformvalue=value" What I expect is this: formvalue="value" Yuck! I found a very old bug report consistent with this from 2002 ( http://bugs.php.net/bug.php?id=18648 ) that suggested adding a hidden form element like this: <input type=hidden name=bugfix> This does indeed fix the problem, but seems like this bug has returned in a recent version of PHP. Is there a fix? I could not find any other bugs matching this report, and believe it was reintroduced with 4.3.11. Reproduce code: --------------- <html> <body> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { $formvalue = trim($_POST['formvalue']); print "Recieved from Post: '". $formvalue."'"; } ?> <form action="#" method="post"> <p> FORM VALUE:<br><br><input type="text" name="formvalue" value="" size="50" maxlength="50"></td> <input type= submit value=submit> </p> </form> </body> </html> Expected result: ---------------- I expect this: formvalue=value Actual result: -------------- I get this: formvalue=valueformvalue=value -- Edit bug report at http://bugs.php.net/?id=33759&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33759&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33759&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33759&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33759&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33759&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33759&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33759&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33759&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33759&r=support Expected behavior: http://bugs.php.net/fix.php?id=33759&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33759&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33759&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33759&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33759&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33759&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33759&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33759&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33759&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33759&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33759&r=mysqlcfg