diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2022-11-11 12:48:09 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2022-11-11 12:48:09 +0000 |
| commit | 39bfe684117e624e3f6e0b35bffa4dc10c7479a2 (patch) | |
| tree | 8f389acb4f19d073e8e42517b4a3ba8436ed20b9 /app | |
| parent | e61800c63a95d7c6735b8363fe56a82e1a1c40f6 (diff) | |
| download | webtrees-39bfe684117e624e3f6e0b35bffa4dc10c7479a2.tar.gz webtrees-39bfe684117e624e3f6e0b35bffa4dc10c7479a2.tar.bz2 webtrees-39bfe684117e624e3f6e0b35bffa4dc10c7479a2.zip | |
Fix: static analysis
Diffstat (limited to 'app')
| -rw-r--r-- | app/I18N.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/I18N.php b/app/I18N.php index e74be5b61b..37cf4a7c8c 100644 --- a/app/I18N.php +++ b/app/I18N.php @@ -569,8 +569,10 @@ class I18N */ public static function comparator(): Closure { - if (self::$collator instanceof Collator) { - return static fn (string $x, string $y): int => (int) self::$collator->compare($x, $y); + $collator = self::$collator; + + if ($collator instanceof Collator) { + return static fn (string $x, string $y): int => (int) $collator->compare($x, $y); } return static fn (string $x, string $y): int => strcmp(self::strtolower($x), self::strtolower($y)); |
