Browse Source

conditions cleanup

tags/2.0.0-beta
Alexander Makarov 12 years ago
parent
commit
8f7757a25c
  1. 2
      framework/helpers/base/Html.php
  2. 2
      framework/widgets/ActiveForm.php

2
framework/helpers/base/Html.php

@ -728,7 +728,7 @@ class Html
if (!isset($options['size'])) { if (!isset($options['size'])) {
$options['size'] = 4; $options['size'] = 4;
} }
if (isset($options['multiple']) && $options['multiple'] && substr($name, -2) !== '[]') { if (!empty($options['multiple']) && substr($name, -2) !== '[]') {
$name .= '[]'; $name .= '[]';
} }
$options['name'] = $name; $options['name'] = $name;

2
framework/widgets/ActiveForm.php

@ -64,7 +64,7 @@ class ActiveForm extends Widget
$models = array($models); $models = array($models);
} }
$showAll = isset($options['showAll']) && $options['showAll']; $showAll = !empty($options['showAll']);
$lines = array(); $lines = array();
/** @var $model Model */ /** @var $model Model */
foreach ($models as $model) { foreach ($models as $model) {

Loading…
Cancel
Save