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