From 2e42954f2860f26a654d4497b6b3ca05945f7da2 Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 3 May 2022 20:26:05 +0300 Subject: [PATCH] Update BaseHtml.php --- src/BaseHtml.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/BaseHtml.php b/src/BaseHtml.php index d01e1b4..fba0fff 100644 --- a/src/BaseHtml.php +++ b/src/BaseHtml.php @@ -145,7 +145,9 @@ abstract class BaseHtml extends \yii\helpers\Html */ public static function error($model, $attribute, $options = []): string { - static::addCssClass($options, 'invalid-feedback'); + if (!array_key_exists('class', $options)) { + $options['class'] = ['invalid-feedback']; + } return parent::error($model, $attribute, $options); }