From fe9b52c61b8952f485a49eab8bc530f62b95dee3 Mon Sep 17 00:00:00 2001 From: Maksim Spirkov <63721828+mspirkov@users.noreply.github.com> Date: Mon, 13 Oct 2025 10:00:17 +0300 Subject: [PATCH] Fix #20595: Fix `@return` annotation for `BaseHtml::getAttributeValue()` --- framework/CHANGELOG.md | 1 + framework/helpers/BaseHtml.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index efeb0d77e7..de641fba6a 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -49,6 +49,7 @@ Yii Framework 2 Change Log - Bug #20583: Fix return value in `Request::getServerPort` (mspirkov) - Bug #20587: Fix `@var` annotation for `yii\rbac\Item::$ruleName` (mspirkov) - Bug #20589: Fix `@var` annotations for `yii\rbac\DbManager` properties (mspirkov) +- Bug #20595: Fix `@return` annotation for `BaseHtml::getAttributeValue()` (mspirkov) 2.0.53 June 27, 2025 diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php index c1858086cf..009019921d 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -2284,7 +2284,7 @@ class BaseHtml * * @param Model $model the model object * @param string $attribute the attribute name or expression - * @return string|array the corresponding attribute value + * @return string|array|null the corresponding attribute value * @throws InvalidArgumentException if the attribute name contains non-word characters. */ public static function getAttributeValue($model, $attribute)