Last modified: 2009-02-18 14:24:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T19552, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17552 - Empty lists are shown as null
Empty lists are shown as null
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.15.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-18 12:40 UTC by Tim Starling
Modified: 2009-02-18 14:24 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tim Starling 2009-02-18 12:40:12 UTC
Empty lists as output from many modules are shown as null rather than as an empty tag.

Reported at <http://lists.wikimedia.org/pipermail/wikitech-l/2009-February/041534.html>

Test case: <http://en.wikipedia.org/w/api.php?action=query&list=recentchanges&rcend=0>

Expected XML:

<api>
  <query>
    <recentchanges />
  </query>
</api>

Expected JSON:

{
	"query": {
		"recentchanges": [
		]
	}
}

Actual XML:

<api>
  <query recentchanges="" />
</api>

Actual JSON:

{
	"query": {
		"recentchanges": null
	}
}
Comment 1 Tim Starling 2009-02-18 12:44:10 UTC
My proposed fix in r47447 will be live shortly as a temporary fix, pending review by someone more knowledgeable.
Comment 2 Roan Kattouw 2009-02-18 14:18:04 UTC
(In reply to comment #1)
> My proposed fix in r47447 will be live shortly as a temporary fix, pending
> review by someone more knowledgeable.
> 

Looks good to me.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links