summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
180c63a)
If a caller gives an empty array for $targetsWithVisitThresholds, per
the documentation it should be expecting an empty array in return, not a
count of watchers for every title in the database.
Bug: T204729
Change-Id: I0f25fae301450d077bb30597281aaef0fba209d4
array $targetsWithVisitThresholds,
$minimumWatchers = null
) {
array $targetsWithVisitThresholds,
$minimumWatchers = null
) {
+ if ( $targetsWithVisitThresholds === [] ) {
+ // No titles requested => no results returned
+ return [];
+ }
+
$dbr = $this->getConnectionRef( DB_REPLICA );
$conds = $this->getVisitingWatchersCondition( $dbr, $targetsWithVisitThresholds );
$dbr = $this->getConnectionRef( DB_REPLICA );
$conds = $this->getVisitingWatchersCondition( $dbr, $targetsWithVisitThresholds );