From: Umherirrender Date: Sat, 29 Jun 2019 21:33:36 +0000 (+0200) Subject: watcheditem: Fix bad $options param in NoWriteWatchedItemStore::countWatchersMultiple X-Git-Tag: 1.34.0-rc.0~333^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=c2cbe376b026a3adb5cacf429019dd181880ed44;p=lhc%2Fweb%2Fwiklou.git watcheditem: Fix bad $options param in NoWriteWatchedItemStore::countWatchersMultiple countVisitingWatchersMultiple is documented to take int|null as second parameter, but array is given here. The options array is documented to have a minimumWatchers key, so fix it by using that key. Caught by PhanTypeMismatchArgument, to be enabled with I34d65fe3ff191. Change-Id: I0271edae3442fc1adafabf623beeb7f2c4411d6c --- diff --git a/includes/watcheditem/NoWriteWatchedItemStore.php b/includes/watcheditem/NoWriteWatchedItemStore.php index 72f6086dfb..69dcec854e 100644 --- a/includes/watcheditem/NoWriteWatchedItemStore.php +++ b/includes/watcheditem/NoWriteWatchedItemStore.php @@ -57,7 +57,10 @@ class NoWriteWatchedItemStore implements WatchedItemStoreInterface { } public function countWatchersMultiple( array $targets, array $options = [] ) { - return $this->actualStore->countVisitingWatchersMultiple( $targets, $options ); + return $this->actualStore->countVisitingWatchersMultiple( + $targets, + $options['minimumWatchers'] ?? null + ); } public function countVisitingWatchersMultiple(