Bug Tracker

Modify

Ticket #9360 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

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

comment:1 Changed 2 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

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

comment:2 Changed 2 years ago by dmethvin

Duplicate of #6481.

comment:3 Changed 2 years ago by timmywil

#9348 is a duplicate of this ticket.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.