diff --git a/framework/helpers/base/Html.php b/framework/helpers/base/Html.php index 5e7f4ad..bb1fed3 100644 --- a/framework/helpers/base/Html.php +++ b/framework/helpers/base/Html.php @@ -728,7 +728,7 @@ class Html if (!isset($options['size'])) { $options['size'] = 4; } - if (isset($options['multiple']) && $options['multiple'] && substr($name, -2) !== '[]') { + if (!empty($options['multiple']) && substr($name, -2) !== '[]') { $name .= '[]'; } $options['name'] = $name; diff --git a/framework/widgets/ActiveForm.php b/framework/widgets/ActiveForm.php index 48bc181..8192bc0 100644 --- a/framework/widgets/ActiveForm.php +++ b/framework/widgets/ActiveForm.php @@ -64,7 +64,7 @@ class ActiveForm extends Widget $models = array($models); } - $showAll = isset($options['showAll']) && $options['showAll']; + $showAll = !empty($options['showAll']); $lines = array(); /** @var $model Model */ foreach ($models as $model) {