From 32e363483879288ef49f9b401af1a35c52fac076 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Sat, 19 Oct 2013 01:04:24 +0400 Subject: [PATCH] Fixed ActiveForm --- framework/yii/widgets/ActiveForm.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/yii/widgets/ActiveForm.php b/framework/yii/widgets/ActiveForm.php index 3bd4a11ca0..13135cfe77 100644 --- a/framework/yii/widgets/ActiveForm.php +++ b/framework/yii/widgets/ActiveForm.php @@ -214,7 +214,9 @@ class ActiveForm extends Widget */ public function errorSummary($models, $options = []) { - $models = (array)$models; + if (!is_array($models)) { + $models = [$models]; + } $lines = []; foreach ($models as $model) {