When I click on the Signup button I receive the following error: Array to string conversion.
I think that the error occurs when I call `fileInput()` method but i don't know how to solve it.  

This is the partial code of the view

```
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?>

<?= $form->field($model, 'password')->passwordInput() ?>

<?= $form->field($model, 'email') ?>

<?= $form->field($modelUpload, 'imageFile')->fileInput() ?>

<div class="form-group">
    <?= Html::submitButton('Signup', ['class' => 'btn', 'name' => 'signup-button']) ?>
</div>
<?php ActiveForm::end(); ?>

```

While this is the code for the controller:

```
    <?php

class SiteController extends Controller {

    /**
     * Signs user up.
     *
     * @return mixed
     */
    public function actionSignup() {
        $model = new SignupForm();
        $modelUpload = new UploadForm();
        if ($model->load(Yii::$app->request->post()) && $modelUpload->load(Yii::$app->request->post())) {
            $modelUpload->imageFile = UploadedFile::getInstances($modelUpload, 'imageFile');

            if ($user = $model->signup()) {

                if (Yii::$app->getUser()->login($user) && $modelUpload->upload()) {

                    return $this->goHome();
                }
            }
        }

        return $this->render('signup', [
                    'model' => $model,
                    'modelUpload' => $modelUpload,
        ]);
    }

}

```

This is the code of the model. It's the same of the official documentation.

```
<?php

class UploadForm extends Model {

    /**
     * @var UploadedFile
     */
    public $imageFile;

    public function rules() {
        return [
            [['imageFile'], 'file', 'skipOnEmpty' => false, 'extensions' => 'png, jpg'],
        ];
    }

    public function upload() {
        if ($this->validate()) {
            $this->imageFile->saveAs('uploads/' . $this->imageFile->baseName . '.' . $this->imageFile->extension);
            return true;
        } else {
            return false;
        }
    }

}
?>

```

Errors:

[![First screenshot](https://i.stack.imgur.com/M4HYF.png)](https://i.stack.imgur.com/M4HYF.png)

[![Second screenshot](https://i.stack.imgur.com/RnJGe.png)](https://i.stack.imgur.com/RnJGe.png)

[![Third screenshot](https://i.stack.imgur.com/Rr62m.png)](https://i.stack.imgur.com/Rr62m.png)