diff --git a/modules/backend/behaviors/FormController.php b/modules/backend/behaviors/FormController.php index 6e71b116b..3a7b53927 100644 --- a/modules/backend/behaviors/FormController.php +++ b/modules/backend/behaviors/FormController.php @@ -530,7 +530,7 @@ class FormController extends ControllerBehavior $singularTypes = ['belongsTo', 'hasOne', 'morphOne']; foreach ($saveData as $attribute => $value) { - if ($model->hasRelation($attribute) && in_array($model->getRelationType($attribute), $singularTypes)) + if (is_array($value) && $model->hasRelation($attribute) && in_array($model->getRelationType($attribute), $singularTypes)) $this->setModelAttributes($model->{$attribute}, $value); else $model->{$attribute} = $value;