Page MenuHomePhabricator

list=logevent userid is returned as string, should be integer
Closed, ResolvedPublic

Description

When making the following query:

http://en.wikipedia.org/w/api.php?action=query&list=logevents&leprop=ids|user|userid&format=jsonfm&lelimit=1

the "userid" field's value is surrounded by quotes, making it a string. Similar queries (e.g. to prop=revisions) return userid as an integer.

http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Anarchism&rvlimit=1&rvprop=ids|user|userid&format=jsonfm


Version: unspecified
Severity: normal

Details

Reference
bz68921

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 3:40 AM
bzimport added a project: MediaWiki-API.
bzimport set Reference to bz68921.
bzimport added a subscriber: Unknown Object (MLST).
Halfak created this task.Jul 31 2014, 2:23 PM

Change 150823 had a related patch set uploaded by Reedy:
list=logevent userid is returned as string, should be integer

https://gerrit.wikimedia.org/r/150823

Reedy added a comment.Jul 31 2014, 2:26 PM

The inbuilt docs say it should be an int too

			'userid' => array(
				'userhidden' => 'boolean',
				'userid' => array(
					ApiBase::PROP_TYPE => 'integer',
					ApiBase::PROP_NULLABLE => true
				),
				'anon' => 'boolean'
			),

Change 150823 merged by jenkins-bot:
list=logevent userid is returned as string, should be integer

https://gerrit.wikimedia.org/r/150823