X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcache%2FGenderCache.php;h=7228814d4702edf3eace6108473b4576f4e618b8;hb=0ada062ce62a261e55eb2bfbe9c6f74ffbaa05e5;hp=099a986f7b1cb2d977c7ecc6d2aa8e73fa61b854;hpb=2b6f3f0adc475da7eab1ef04dfe917e5536e6e10;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/GenderCache.php b/includes/cache/GenderCache.php index 099a986f7b..7228814d47 100644 --- a/includes/cache/GenderCache.php +++ b/includes/cache/GenderCache.php @@ -85,7 +85,7 @@ class GenderCache { /* Undefined if there is a valid username which for some reason doesn't * exist in the database. */ - return isset( $this->cache[$username] ) ? $this->cache[$username] : $this->getDefault(); + return $this->cache[$username] ?? $this->getDefault(); } /** @@ -171,7 +171,7 @@ class GenderCache { $res = $dbr->select( $table, $fields, $conds, $comment, [], $joins ); foreach ( $res as $row ) { - $this->cache[$row->user_name] = $row->up_value ? $row->up_value : $default; + $this->cache[$row->user_name] = $row->up_value ?: $default; } }