Commit 03b88dd6 by Kartik Visweswaran Committed by Alexander Makarov

Fixes #5424: `Html::addCssStyle()` wasn't correctly setting style passed in array

parent 1b6431f4
...@@ -10,6 +10,7 @@ Yii Framework 2 Change Log ...@@ -10,6 +10,7 @@ Yii Framework 2 Change Log
- Bug #5323: Nested dropdown does not work for `yii\bootstrap\DropDown` (aryraditya) - Bug #5323: Nested dropdown does not work for `yii\bootstrap\DropDown` (aryraditya)
- Bug #5336: `yii\bootstrap\DropDown` should register bootstrap plugin asset (zelenin) - Bug #5336: `yii\bootstrap\DropDown` should register bootstrap plugin asset (zelenin)
- Bug #5379: `Module::afterAction()` was called even when `beforeAction()` returned false (cebe) - Bug #5379: `Module::afterAction()` was called even when `beforeAction()` returned false (cebe)
- Bug #5424: `Html::addCssStyle()` wasn't correctly setting style passed in array (kartik-v, samdark)
- Bug: Date and time formatting now assumes UTC as the timezone for input dates unless a timezone is explicitly given (cebe) - Bug: Date and time formatting now assumes UTC as the timezone for input dates unless a timezone is explicitly given (cebe)
- Enh #4040: Added `$viewFile` and `$params` to the `EVENT_BEFORE_RENDER` and `EVENT_AFTER_RENDER` events for `View` (qiangxue) - Enh #4040: Added `$viewFile` and `$params` to the `EVENT_BEFORE_RENDER` and `EVENT_AFTER_RENDER` events for `View` (qiangxue)
- Enh #4275: Added `removeChildren()` to `yii\rbac\ManagerInterface` and implementations (samdark) - Enh #4275: Added `removeChildren()` to `yii\rbac\ManagerInterface` and implementations (samdark)
......
...@@ -1703,9 +1703,9 @@ class BaseHtml ...@@ -1703,9 +1703,9 @@ class BaseHtml
} }
} }
} }
$style = static::cssStyleFromArray(array_merge($oldStyle, $newStyle)); $style = array_merge($oldStyle, $newStyle);
} }
$options['style'] = $style; $options['style'] = is_array($style) ? static::cssStyleFromArray($style) : $style;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment