.query() Array-Parameters won't fill PHP's $_GET as intended
Open
Nobody has claimed this yet.
QueryString
Requires More Interest
- Dominant language
- JavaScript
- Stars
- 6.2k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
Current Version
This Code:
.query({ foo: "bar", hello: ["world", "mars"] });
Leads to this:
// -> http://example.com/bar/foo.xml?foo=bar&hello=world&hello=mars
I think that's kinda senseless. Cause this is what we see on the Server-Side:
$_GET = array(
'foo' => 'bar',
'hello' => 'mars'
);
I.e. "hello=world" is missing and no one can work with it.
Improved Version
Better:
// -> http://example.com/bar/foo.xml?foo=bar&hello[]=world&hello[]=mars
Results in this:
$_GET = array(
'foo' => 'bar',
'hello' => array(
0 => 'world',
1 => 'mars'
)
);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the .query() entry point and reproduce the array-parameter example from the issue. Trace how array values become the query string, then verify the result against PHP's $_GET parsing. Done means repeated array parameters use bracket notation so both values are preserved server-side.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100