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
}
if ( $this->fld_watchers ) {
- if ( $this->watchers[$ns][$dbkey] !== 0 || $this->showZeroWatchers ) {
+ if ( $this->watchers !== null && $this->watchers[$ns][$dbkey] !== 0 ) {
$pageInfo['watchers'] = $this->watchers[$ns][$dbkey];
+ } elseif ( $this->showZeroWatchers ) {
+ $pageInfo['watchers'] = 0;
}
}