Bug Tracker

Opened 14 years ago

Closed 13 years ago

#3775 closed bug (duplicate)

$.get() doesn't shift 'type' argument when 'data' argument is omitted

Reported by: Wim Leers Owned by: aflesler
Priority: minor Milestone: 1.4
Component: ajax Version: 1.3.1
Keywords: get Cc:
Blocked by: Blocking:


callback is shifted, but type isn't.

Attachments (1)

get_arguments.patch (370 bytes) - added by Wim Leers 14 years ago.

Download all attachments as: .zip

Change History (8)

Changed 14 years ago by Wim Leers

Attachment: get_arguments.patch added

comment:1 Changed 14 years ago by dmethvin

Owner: set to aflesler

Looks like a good fix.

comment:2 Changed 14 years ago by john


I think this is OK, though - the type argument isn't meant to be used by external developers (it's for internal uses, only). Actually, it should probably just be removed outright.

comment:3 Changed 14 years ago by dmethvin

Also, it's tricky to shift the parameters because getScript and getJSON always pass the type as the fourth arg even if not all the args are provided.

Maybe we just need the docs to clarify that if an arg is left out it should be replaced with a null rather than shifting down the subsequent args.

comment:4 Changed 14 years ago by dmethvin

See duplicate #4384 for a patch that can be applied if this functionality is not removed. Note that $.get and $.post publicly document that type is a parameter so I'm not sure it can be removed at this point without heartache.



comment:5 Changed 14 years ago by paul.irish

This ticket is a dupe of #2452 which has a patch that'll fix both $.get() and $.post()

comment:6 Changed 14 years ago by yehuda


comment:7 Changed 13 years ago by flesler

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.