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:
Description

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

milestone: 1.31.3.2
version: 1.2.61.3.1

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.

http://docs.jquery.com/Ajax/jQuery.get#urldatacallbacktype

http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype

Changed June 01, 2009 08:57PM UTC by paul.irish 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

milestone: 1.3.21.3.3

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

resolution: → duplicate
status: newclosed