Bug #64325 [Fbk->NoF]: Issue in automatic $_POST array handling
| From: | php-bugs at lists dot php dot net | Date: | Tue, 15 Oct 2013 11:54:38 +0000 |
| Subject: | Bug #64325 [Fbk->NoF]: Issue in automatic $_POST array handling | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182228@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64325&edit=1
ID: 64325
Updated by: php-bugs@lists.php.net
Reported by: php at sygmoral dot com
Summary: Issue in automatic $_POST array handling
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: *General Issues
Operating System: Debian
PHP Version: 5.4.12
Assigned To: laruence
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2013-03-03 14:28:14] laruence@php.net
I noticed, that's why I didn't going further,
and I don't think it related to documented or not:
<?php
$array ["[]"] = "xxxx";
var_dump($array["[]"]);
------------------------------------------------------------------------
[2013-03-03 14:10:48] reeze@php.net
The attached patch may break form like: foo[bar][index]=test
after some research, this seems a undocumented behavior but not a bug.
only the field name
save can not have '[' and other special chars.
the subkeys didn't required to be a legal variable name but '[]' are special
chars.
------------------------------------------------------------------------
[2013-03-01 03:29:43] laruence@php.net
The following patch has been added/updated:
Patch Name: bug64325.patch
Revision: 1362108583
URL: https://bugs.php.net/patch-display.php?bug=64325&patch=bug64325.patch&revision=1362108583
------------------------------------------------------------------------
[2013-03-01 03:29:02] laruence@php.net
PHP won't allow variables name to contains "[", "." etc , so I think this
is
really a narrow usage.
but, however I do believe there is a bug.
a patch will be attached. but I need to ask someone else's opinion before commit
it.
thanks
------------------------------------------------------------------------
[2013-02-28 19:45:57] php at sygmoral dot com
Thank you for your reaction!
But no: I did in fact mean what I wrote. I realise it's a strange data structure, so
here's a short explanation for it: the 'save' array holds a collection of html form
elements that are not yet to be submitted, but should be saved temporarily into some other set of
memory, so that upon the next visit, those temporary values can be easily inserted into the
displayed form, without having been submitted. In other words, it's for a form that remembers
its state throughout visits.
So I send an object containing the name-value pairs in the form, and send that over POST. In the
example used here, this results in one or more name-value pairs that are saved into the save array,
as save['line[]'] = value.
And that is the situation that triggers this bug, as in my original post. I'm sure there are
other ways to achieve what I want, but I figured I'd report it since this does not look as if
it's intended.
Note that the example is a simplification of my application, where multiple 'single' and
'array' values are saved.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=64325
--
Edit this bug report at https://bugs.php.net/bug.php?id=64325&edit=1