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: |
Description
callback is shifted, but type isn't.
Attachments (1)
Change History (8)
Changed 14 years ago by
Attachment: | get_arguments.patch added |
---|
comment:1 Changed 14 years ago by
Owner: | set to aflesler |
---|
comment:2 Changed 14 years ago by
Milestone: | 1.3 → 1.3.2 |
---|---|
Version: | 1.2.6 → 1.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.
comment:3 Changed 14 years ago by
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
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
comment:5 Changed 14 years ago by
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
Milestone: | 1.3.2 → 1.3.3 |
---|
comment:7 Changed 13 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Looks like a good fix.