From c2cbe376b026a3adb5cacf429019dd181880ed44 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 29 Jun 2019 23:33:36 +0200 Subject: [PATCH] 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 --- includes/watcheditem/NoWriteWatchedItemStore.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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( -- 2.20.1