X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fwatcheditem%2FWatchedItemStore.php;h=6b0c2aab1104b371f56292d21a09f56ed2328933;hb=6f3d5a5204770b7e9076ec0c956631c32a9e1114;hp=6e907deef825dc89571ecf712ba073f4ab14a783;hpb=75e3edb416aea15e4be2dfb0a4b66beef81f45f1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/watcheditem/WatchedItemStore.php b/includes/watcheditem/WatchedItemStore.php index 6e907deef8..6b0c2aab11 100644 --- a/includes/watcheditem/WatchedItemStore.php +++ b/includes/watcheditem/WatchedItemStore.php @@ -407,6 +407,11 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac array $targetsWithVisitThresholds, $minimumWatchers = null ) { + if ( $targetsWithVisitThresholds === [] ) { + // No titles requested => no results returned + return []; + } + $dbr = $this->getConnectionRef( DB_REPLICA ); $conds = $this->getVisitingWatchersCondition( $dbr, $targetsWithVisitThresholds );