php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #142 (Again): BUT in ass. arrays passed in a FORM if the index contains spaces
Submitted: 1998-03-03 19:26 UTC Modified: 1998-04-24 12:03 UTC
From: merc at iternet dot it Assigned:
Status: Closed Package: Other
PHP Version: 3.0b2 OS: Linux
Private report: No CVE-ID: None
 [1998-03-03 19:26 UTC] merc at iternet dot it
Hi,

I was told that the bug was because of my, since 
I put "'" character in the [ ].
Sorry, but I really don't think so!

Why not?
Try this:

form.php3
--------
<HTML>
<BODY>
<FORM ACTION=try.php3 METHOD=POST>
  <INPUT TYPE=HIDDEN NAME="vettore[one two]"    VALUE=SOMETHING>

  <INPUT TYPE=HIDDEN NAME="vettore[three_four]" VALUE=SOMETHING>
  <INPUT TYPE=SUBMIT>
</FORM>

try.php3
---------
<?

  echo "VALORE: ". $vettore["one two"]." <BR>\n";
  echo "VALORE: ". $vettore["three_four"]." <BR>\n";

?>

RESULT:
VALORE: 
VALORE: SOMETHING 

So, there is a problem if the key of the array contains 
a space!

Sorry if I bothered you...! :-|

Merc.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-24 12:03 UTC] zeev
Fixed

 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Oct 03 06:05:53 2022 UTC