From: Aryeh Gregor Date: Tue, 31 Jul 2018 13:17:42 +0000 (+0300) Subject: Return array without holes from User::getAllGroups X-Git-Tag: 1.34.0-rc.0~4588^2~1 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=115d4e282689bafe27f033c92aa4405d5dda42eb;p=lhc%2Fweb%2Fwiklou.git Return array without holes from User::getAllGroups Change-Id: I2933ffe2cddec3d595536f93df17b609cdabab9e --- diff --git a/includes/user/User.php b/includes/user/User.php index 8ebd2d27cc..5e57a18891 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -5073,10 +5073,10 @@ class User implements IDBAccessObject, UserIdentity { */ public static function getAllGroups() { global $wgGroupPermissions, $wgRevokePermissions; - return array_diff( + return array_values( array_diff( array_merge( array_keys( $wgGroupPermissions ), array_keys( $wgRevokePermissions ) ), self::getImplicitGroups() - ); + ) ); } /**