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:59:53 +0000 (17:59 +0000)
commitfac144565411ba560c96b5913b2b054e48deadd7
tree25dacf562f1c0648f09e95af965c2f0adc92da24
parent27fbb0c3fd71b95074172a4e12085beae9a532bf
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