diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 4ed527b0a76..84786927ce9 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -16,6 +16,7 @@ Yii Framework 2 Change Log - Enh #19884: Added support Enums in Query Builder (sk1t0n) - Bug #19908: Fix associative array cell content rendering in Table widget (rhertogh) - Bug #19906: Fixed multiline strings in the `\yii\console\widgets\Table` widget (rhertogh) +- Bug #19924: Fix `yii\i18n\Formatter` to not throw error `Unknown named parameter` under PHP 8 (arollmann) - Bug #19914: Fixed `ArrayHelper::keyExists()` and `::remove()` functions when the key is a float and the value is `null` (rhertogh) - Enh #19920: Broadened the accepted type of `Cookie::$expire` from `int` to `int|string|\DateTimeInterface|null` (rhertogh) diff --git a/framework/i18n/Formatter.php b/framework/i18n/Formatter.php index 3236a433beb..001b81bfa90 100644 --- a/framework/i18n/Formatter.php +++ b/framework/i18n/Formatter.php @@ -460,7 +460,7 @@ public function format($value, $format) } $method = 'as' . $format; if ($this->hasMethod($method)) { - return call_user_func_array([$this, $method], $params); + return call_user_func_array([$this, $method], array_values($params)); } throw new InvalidArgumentException("Unknown format type: $format");