X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMWGrants.php;h=cbe5a1a141a77f379f53e6a06d9dc618b3efb45c;hb=7c2ad4cc239e21022ed3dc302d06eebe24916348;hp=3079c65512fe07c08440fc49f5512c6c3a6d4528;hpb=4077b57759756ecd0d25427ec9598feb28a28ac1;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 = [];