API: Fix PHP Warning for "count(): Parameter must be an array"
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 19 Apr 2018 01:39:23 +0000 (02:39 +0100)
committerKrinkle <krinklemail@gmail.com>
Thu, 19 Apr 2018 17:55:30 +0000 (17:55 +0000)
commite3ce482e1b4da374ac350ccdfb5d0bbb7755b423
tree2b212eaed1a9ce673499a7475e7b855e23a47bc7
parent275e50c750e82e20067111ae1135b3df127708a0
API: Fix PHP Warning for "count(): Parameter must be an array"

Found by the new ApiUserrights test introduced in 5ab1bee6bcf:
> includes/specials/SpecialUserrights.php:462
> includes/specials/SpecialUserrights.php:405
> includes/api/ApiUserrights.php:116

The $tags parameter of the UserrightsPage::doSaveUserGroups()
method must be an array and is not nullable. Fix the caller
to not pass null, but an empty array.

Bug: T182377
Change-Id: Ic9be6a0bddfac023de765c810c07a64d651c33b4
includes/api/ApiUserrights.php