#20355 [Opn->Csd]: Eating the first 4 characters of array variables submitted through forms
| From: | moriyoshi@php.net | Date: | Mon, 11 Nov 2002 11:27:49 +0000 |
| Subject: | #20355 [Opn->Csd]: Eating the first 4 characters of array variables submitted through forms | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24532@lists.php.net to get a copy of this message | ||
ID: 20355
Updated by: moriyoshi@php.net
Reported By: brett@brettodonnell.com
-Status: Open
+Status: Closed
Bug Type: Arrays related
Operating System: RedHat 7.2
PHP Version: 4.2.3
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-11-11 05:26:59] brett@brettodonnell.com
Variables are having the first 4 characters chopped off when submitted
through a form...
Inputs like this:
<input type=text name=left[size]>
I have a form that looks like this (cut down):
----------------------
<form>
$left["size"]: <input type=text name=left[size]> array variable<br>
$size: <input type=text name=size> normal variable<br>
<input type=submit>
</form>
<br>
<br>$left["size"]: <?php print $left["size"]; ?>
<br>$size: <?php print $size; ?>
----------------------
The variable $size works as expected.
The variable $left["size"] has the first 4 characters stripped if the
variable is 4 or more characters.
I enter these:
123 - works as intended
1234 - strips the first 4 characters leaving the variable empty
1234567890 - will strip the first 4 characters leaving the variable as
"567890"
red - works as intended
blue - strips the first 4 characters leaving the variable empty
orange - will strip the first 4 characters leaving the variable as "ge"
The same problems do NOT occur on Windows XP.
I am changed back to PHP 4.2.2 and it was fixed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20355&edit=1