Browse Source

Change magic property to normal method. (Thanks to @maxlapko.)

tags/2.0.0-beta
resurtm 12 years ago
parent
commit
b314d96355
  1. 4
      yii/base/Controller.php

4
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;
}
}

Loading…
Cancel
Save