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