X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMWGrants.php;h=cbe5a1a141a77f379f53e6a06d9dc618b3efb45c;hb=5cab4cb67af3564bcd51db05a06b015787b3a4cd;hp=3079c65512fe07c08440fc49f5512c6c3a6d4528;hpb=9bd9b2f02b3001e1a90ec2861a31cb54b7c7f1ed;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MWGrants.php b/includes/MWGrants.php index 3079c65512..cbe5a1a141 100644 --- a/includes/MWGrants.php +++ b/includes/MWGrants.php @@ -86,10 +86,8 @@ class MWGrants { * @return string[] Corresponding grant descriptions */ public static function grantNames( array $grants, $lang = null ) { - if ( $lang !== null ) { - if ( is_string( $lang ) ) { - $lang = Language::factory( $lang ); - } + if ( $lang !== null && is_string( $lang ) ) { + $lang = Language::factory( $lang ); } $ret = [];