X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=languages%2FLanguage.php;h=deee2bce7776ac1d2ac4d835f487cc2665e8708f;hb=c1bbef5b201f04e8fd74c97f984058ed2ad2c469;hp=28469efec10b543202e57663377530a33276d921;hpb=c3cb2177a29018abb383d79a15b255c0c4c6c991;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/Language.php b/languages/Language.php index 28469efec1..deee2bce77 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1090,7 +1090,7 @@ class Language { * @param string $ts 14-character timestamp * YYYYMMDDHHMMSS * 01234567890123 - * @param DateTimeZone $zone Timezone of $ts + * @param DateTimeZone|null $zone Timezone of $ts * @param int &$ttl The amount of time (in seconds) the output may be cached for. * Only makes sense if $ts is the current time. * @todo handling of "o" format character for Iranian, Hebrew, Hijri & Thai? @@ -4076,7 +4076,7 @@ class Language { * match up with it. * * @param string $str The validated block duration in English - * @param User $user User object to use timezone from or null for $wgUser + * @param User|null $user User object to use timezone from or null for $wgUser * @param int $now Current timestamp, for formatting relative block durations * @return string Somehow translated block duration * @see LanguageFi.php for example implementation @@ -4400,7 +4400,7 @@ class Language { * @return bool */ public function equals( Language $lang ) { - return $lang->getCode() === $this->mCode; + return $lang === $this || $lang->getCode() === $this->mCode; } /**