Ticket #2795 (new bug)

Opened 3 years ago

Last modified 3 years ago

getParameters does not deal correctly with duplicate parameter names

Reported by: bartvde Owned by:
Priority: minor Milestone: 3.0 Release
Component: Util Version: 2.9
Keywords: Cc:
State: Review

Description

When OpenLayers.Util.getParameters is fed a url which contains something like:

?filter=a&address=foo&filter=b

the parameter filter will only contain the last value (b).

It should contain an array of the two values a and b.

Attachments

ticket2795.patch Download (1.9 KB) - added by bartvde 3 years ago.

Change History

Changed 3 years ago by bartvde

  • state set to Review

Util tests pass in FF 3.6 and Safari 5, please review.

Changed 3 years ago by bartvde

Changed 3 years ago by crschmidt

I'm not convinced that this is an appropriate change to make without backwards compatibility concerns. For example, if someone does map.html?lat=42&lon=-71&lat=73&lon=17, this change causes the map to break, right? Although I can agree that this is a buggy choice to begin with, I think that it's probably something that we shouldn't break in a point release.

Changed 3 years ago by bartvde

  • milestone changed from 2.10 Release to 3.0 Release

Chris, this is a true concern. I'll move the target to 3.0.

Note: See TracTickets for help on using tickets.