Bug Tracker

Opened 9 years ago

Last modified 8 years ago

#7568 closed bug

jQuery 1.4.4 breaks data for ajax post if 'data' object contains a SUB OBJECT with key named "length" — at Initial Version

Reported by: Arnoman Owned by:
Priority: low Milestone: 1.5.1
Component: ajax Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

Description

This kind of problem has already been reported in ticket 5862 and the problem has been fixed for the 'data' object but the problem remains for sub objects contained in 'data' object:

If there is a key named "length" in an sub object contained in the 'data' object, then the data are broken as the value of "length" is used to redefine the "array" length..

jQuery.ajax({

type: 'POST', url: url, data: {'test': {'length': 3, 'foo': 'bar'} }, success: ...

Data posted are: test[0] undefined test[1] undefined test[2] undefined

Change History (0)

Note: See TracTickets for help on using tickets.