Page MenuHomePhabricator

Different return types depending on whether there is a result
Closed, ResolvedPublic

Description

Author: Bryan.TongMinh

Description:
A call to imageusage which returns an non empty return set gives a dict object, while an empty return set returns an empty list:

Empty:
http://en.wikipedia.org/w/api.php?action=query&format=jsonfm&list=imageusage&titles=Image:Israeli_Army_chopper_flying_to_Lebanon_Aug_11_2006_1.jpg

		"imageusage": [
			
		]

Non empty:
http://commons.wikimedia.org/w/api.php?action=query&format=jsonfm&list=imageusage&titles=Image:Israeli_Army_chopper_flying_to_Lebanon_Aug_11_2006_1.jpg

		"imageusage": {
			"1047480": {
				"pageid": 1047480,
				"ns": 6,
				"title": "Image:Israeli Army chopper flying to Lebanon Aug 11 2006 1.jpg"
			}
		}

Version: unspecified
Severity: normal
URL: http://en.wikipedia.org/w/api.php?action=query&format=jsonfm&list=imageusage&titles=Image:Israeli_Army_chopper_flying_to_Lebanon_Aug_11_2006_1.jpg

Details

Reference
bz9970

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:38 PM
bzimport set Reference to bz9970.
bzimport added a subscriber: Unknown Object (MLST).