X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcache%2FGenderCache.php;h=7228814d4702edf3eace6108473b4576f4e618b8;hb=5623d4c64319a98ddd8263c597002d173464ccbf;hp=099a986f7b1cb2d977c7ecc6d2aa8e73fa61b854;hpb=3f59cb9f3a53ad28f8a95fe299c5de6abd24b453;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; } }