From 0eee39302a22e7c0ef29b6f6d1ed0675b27e9d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=AD=C4=8Dek?= Date: Tue, 30 Sep 2025 00:18:55 +0200 Subject: [PATCH] Fix #20542: Fix `Formatter` working with more complex ICU unit data structure --- framework/CHANGELOG.md | 2 +- framework/i18n/Formatter.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 48335039e9..460fb54da9 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -3,7 +3,7 @@ Yii Framework 2 Change Log 2.0.54 under development ------------------------ - +- Bug #20542: Fix `Formatter` working with more complex ICU unit data structure (OndrejVasicek) - Bug #20483: Fix `CompositeAuth` making bad assumptions on `AuthInterface` implementations (sammousa) - Bug #20432: Fix PHPStan/Psalm annotations for `ActiveQuery::asArray` (max-s-lab) - Bug #20437: Fix PHPStan/Psalm annotations for `BaseArrayHelper::merge` (max-s-lab) diff --git a/framework/i18n/Formatter.php b/framework/i18n/Formatter.php index 354382bd27..31efbc22f7 100644 --- a/framework/i18n/Formatter.php +++ b/framework/i18n/Formatter.php @@ -1679,7 +1679,7 @@ class Formatter extends Component $message = []; foreach ($unitBundle as $key => $value) { - if ($key === 'dnam') { + if ($key === 'dnam' || $key === 'case') { continue; } $message[] = "$key{{$value}}";