From 4b23c4b5bd3bb5f7a4185e496d62a0a40391c402 Mon Sep 17 00:00:00 2001 From: Maksim Spirkov <63721828+max-s-lab@users.noreply.github.com> Date: Mon, 6 Oct 2025 14:35:37 +0400 Subject: [PATCH] Fix #20569: Fix `@param` annotation for `$default` in `HeaderCollection::get` --- framework/CHANGELOG.md | 1 + framework/web/HeaderCollection.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index c0679e2c93..d273bd3d8c 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -43,6 +43,7 @@ Yii Framework 2 Change Log - Enh #19526: Add the `convertIniSizeToBytes` method to `BaseStringHelper` (max-s-lab) - Bug #20570: Fix `@var` annotation for `UrlManager::$cache` (max-s-lab) - Bug #20571: Fix `@var` annotation for `yii\web\Response::$stream` (max-s-lab) +- Bug #20569: Fix `@param` annotation for `$default` in `HeaderCollection::get` (max-s-lab) - Bug #20576: Fix `@var` annotation for `StringValidator::$length` (max-s-lab) diff --git a/framework/web/HeaderCollection.php b/framework/web/HeaderCollection.php index 64cae459b1..57ddd6dfe2 100644 --- a/framework/web/HeaderCollection.php +++ b/framework/web/HeaderCollection.php @@ -67,7 +67,7 @@ class HeaderCollection extends BaseObject implements \IteratorAggregate, \ArrayA /** * Returns the named header(s). * @param string $name the name of the header to return - * @param mixed $default the value to return in case the named header does not exist + * @param string|array|null $default the value to return in case the named header does not exist * @param bool $first whether to only return the first header of the specified name. * If false, all headers of the specified name will be returned. * @return string|array|null the named header(s). If `$first` is true, a string will be returned;