php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11985 BUG with parse_str
Submitted: 2001-07-09 13:17 UTC Modified: 2001-07-10 11:51 UTC
From: benoit_cardon at yahoo dot fr Assigned:
Status: Not a bug Package: URL related
PHP Version: 4.0.6 OS: SOLARIS 2.8
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: benoit_cardon at yahoo dot fr
New email:
PHP Version: OS:

 

 [2001-07-09 13:17 UTC] benoit_cardon at yahoo dot fr
It seems to be a mistake with the function parse_str() applyed to $QUERY_STRING.

URL: http://mycomputer/myscript?delete=10&delete=12

HTML CODE:
<Input type="checkbox" name=delete[] value=10>
<Input type="checkbox" name=delete[] value=12>

And (not the winner is :-) ) parse_str($QUERY_STRING) returns in the environment an array $delete with a size of 4 (instead of 2) !! Some programmer forget to divide a result by 2, or there is something I forget ?

(TEST : $i=0; while (isset($delete)) { print "$delete[$i]\n"; $i++ } ... I obtain 4 writings with this test (i wanted not use the sizeof function for my test)).

Regards

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-09 14:37 UTC] brianlmoon@php.net
Perhaps showing us the complete script and output would help.  With what you have here, I can make no sense of your problem.  That URL could not have been generated by that form as there are no [] in it.

Thanks,

Brian.
 [2001-07-10 11:51 UTC] brianlmoon@php.net
The user was using parse_str on $QUERY_STRING which caused the $delete array to have 4 entries.

Brian.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC