|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-19 00:50 UTC] iliaa@php.net
[2004-05-30 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 17:00:02 2025 UTC |
Description: ------------ Need a explicit type cast... original source: if(yych <= '\277') goto yy15; patched: if(yych <= (YYCTYPE)'\277') goto yy15; Reproduce code: --------------- http://barajas.mit.edu/php_bug/test.php.txt // just the relevant bits here - see url for a working program <?php if (isSet($_POST["submit"])) print_r($_POST["a"]); ?> <form method = "post" action = ""> <input type = "hidden" name = "a[]" value = "val1"> <input type = "hidden" name = "a[]" value = "val2"> <input type = "hidden" name = "a[]" value = "val3"> <input type = "submit" name = "submit" value = "submit"> </form> Expected result: ---------------- The array $_POST["a"] should have three strings in it after the form is submitted. Unpatched PHP-4.3.6 would repeat the last two values in additional two array slots. Forms submitted via get didn't exhibit this behavior. Scalars passed via post also did not exhibit this behavior. After I patched the C code as above, I got three and only three strings back in $_POST["a], which is what I'd expect. Actual result: -------------- Array ( [0] => val1 [1] => val2 [2] => val3 [3] => val2 [4] => val3)