Fix ApiQueryInfo response for prop=watchers
authorLeszek Manicki <leszek.manicki@wikimedia.de>
Wed, 16 Mar 2016 16:07:31 +0000 (17:07 +0100)
committerAddshore <addshorewiki@gmail.com>
Thu, 17 Mar 2016 09:48:30 +0000 (09:48 +0000)
commit4ec20438abf56977b185896e597d0db33c0bbffa
treef2df6b723b4501fc4dfafc05abe1634db2a00005
parentdd6d1762ecf6aa9b5f93794bc383111b93e6cd25
Fix ApiQueryInfo response for prop=watchers

Ie84e6feaa42db1bc7a1f89b56aed37dd7fe95ea4 part of them problem
with incorrect API response but if when no watchers data is
fetched (ie. due to early return in ApiQueryInfo::getWatcherInfo),
response contains "watchers": null instead of skipping "watchers"
key entirely.

Bug: T129482
Change-Id: I9cab120ec4e6a9cf4626678e45ef14ea8efc8cbc
includes/api/ApiQueryInfo.php