From b314d9635538dc5084ebd77f4522234c927995ba Mon Sep 17 00:00:00 2001 From: resurtm Date: Sat, 11 May 2013 15:43:19 +0600 Subject: [PATCH] Change magic property to normal method. (Thanks to @maxlapko.) --- yii/base/Controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yii/base/Controller.php b/yii/base/Controller.php index 3b16a93..1a92a46 100644 --- a/yii/base/Controller.php +++ b/yii/base/Controller.php @@ -318,10 +318,10 @@ class Controller extends Component /** @var Model $model */ $scope = $model->formName(); if ($scope == '') { - $model->attributes = $data; + $model->setAttributes($data); $success = true; } elseif (isset($data[$scope])) { - $model->attributes = $data[$scope]; + $model->setAttributes($data[$scope]); $success = true; } }