Modify ↓
Ticket #9360 (closed bug: duplicate)
Changed behavior of $.param()
| Reported by: | genuinebastard@… | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.next |
| Component: | unfiled | Version: | 1.6.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
In version 1.6.1 $.param() seems to omit empty arrays, so for example:
var obj = { a: 1, b: [] }; console.log($.param(obj));
prints out: a=1
In version 1.5.2 the result would be: a=1&b=
This causes problems with ajax requests etc.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Duplicate of #6481, see the discussion there and in this forum thread: http://forum.jquery.com/topic/change-of-behavior-in-1-4-4-because-of-bug-6481