You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The last uri.toString() is producing a wrong URI, the correct one should be http://test/?param=1¶m=2&another=parameter (notice those array indexes, which don't make sense).
Thanks in advance.
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/13654836-uri-setdata-and-multiple-parameters-with-the-same-name?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github).
The text was updated successfully, but these errors were encountered:
The current behaviur doesn't match PHP's behaviour either. For example:
varstring='qs.php?foo=bar&foo=baz';varuri=newUri(string);uri.toString();// returns the same `string` (not matching PHP behaviour)
The problem appears after adding another paramater, then toString() adds the indexed.
varstring='qs.php?foo=bar&foo=baz';varuri=newUri(string);uri.setData('param','test');uri.setData('param',null);uri.toString();// no longer returns `string`; now indexes were added, even if the parameters are the same
Nonetheless, where I really found this problem was in this piece of code:
varstring='index.php?p[]=1&p[]=2&p[]=3&foo=bar';varuri=newUri(string);uri.toString();// okuri.setData('foo','baz');uri.toString();// doesn't look good:// "index.php?p[][0]=1&p[][1]=2&p[][2]=3&foo=baz"// ^^^ indexes shouldn't be added in this case
Hi,
There's a problem on the
URI
class, which is producing bad URIs when there are multiple parameters with the same name.Code to reproduce the bug:
The last
uri.toString()
is producing a wrong URI, the correct one should behttp://test/?param=1¶m=2&another=parameter
(notice those array indexes, which don't make sense).Thanks in advance.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/13654836-uri-setdata-and-multiple-parameters-with-the-same-name?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github).The text was updated successfully, but these errors were encountered: