|
|
@@ -228,7 +228,7 @@ class SelectBoxWidget extends BasicWidget
|
|
|
// Option groups
|
|
|
$arrayVal = (is_array($val) || $val instanceof Traversable);
|
|
|
if ((!is_int($key) && $arrayVal) ||
|
|
|
- (is_int($key) && $arrayVal && isset($val['options']))
|
|
|
+ (is_int($key) && $arrayVal && (isset($val['options']) || !isset($val['value'])))
|
|
|
) {
|
|
|
$out[] = $this->_renderOptgroup($key, $val, $disabled, $selected, $escape);
|
|
|
continue;
|
|
|
@@ -239,7 +239,7 @@ class SelectBoxWidget extends BasicWidget
|
|
|
'value' => $key,
|
|
|
'text' => $val,
|
|
|
];
|
|
|
- if (is_array($val) && isset($optAttrs['text'], $optAttrs['value'])) {
|
|
|
+ if (is_array($val) && isset($val['text'], $val['value'])) {
|
|
|
$optAttrs = $val;
|
|
|
$key = $optAttrs['value'];
|
|
|
}
|