From 21a040ce72a957e392658a9469ab5a0ff7a4b643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C4=81ris=20Graudi=C5=86=C5=A1?= Date: Fri, 17 Aug 2018 13:31:08 +0300 Subject: [PATCH] fix scenario bug --- src/EditableAction.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/EditableAction.php b/src/EditableAction.php index a8bcf6f..d1a4bbe 100644 --- a/src/EditableAction.php +++ b/src/EditableAction.php @@ -84,7 +84,9 @@ public function run() if ($this->scenario !== null) { $model->setScenario($this->scenario); } - $model->$attribute = $value; + $model->setAttributes([ + $attribute => $value + ]); if ($model->validate([$attribute])) { // no need to specify which attributes as Yii2 handles that via [[BaseActiveRecord::getDirtyAttributes]]