Skip to main content

Bug Tracker

Side navigation

#3775 closed bug (duplicate)

Opened January 04, 2009 02:27AM UTC

Closed September 15, 2009 03:26PM UTC

$.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)
Change History (7)

Changed January 20, 2009 12:37AM UTC by dmethvin comment:1

owner: → aflesler

Looks like a good fix.

Changed February 11, 2009 04:39PM UTC by john comment:2


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.

Changed February 28, 2009 07:53PM UTC by dmethvin comment:3

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.

Changed March 21, 2009 02:30AM UTC by dmethvin comment:4

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.

Changed June 01, 2009 08:57PM UTC by comment:5

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

Changed July 15, 2009 08:50AM UTC by yehuda comment:6


Changed September 15, 2009 03:26PM UTC by flesler comment:7

resolution: → duplicate
status: newclosed