diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index a3c98ed5e23..3aa0122d7d7 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -453,10 +453,8 @@ class ApiQueryInfo extends ApiQueryBase { } if ( $this->fld_watchers ) { - if ( isset( $this->watchers[$ns][$dbkey] ) ) { + if ( $this->watchers[$ns][$dbkey] !== 0 || $this->showZeroWatchers ) { $pageInfo['watchers'] = $this->watchers[$ns][$dbkey]; - } elseif ( $this->showZeroWatchers ) { - $pageInfo['watchers'] = 0; } }