mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
Fix #16145: Fix Html helper checkboxList(), radioList(), renderSelectOptions(), dropDownList(), listBox() methods to work properly with traversable selection
This commit is contained in:
@ -4,6 +4,7 @@ Yii Framework 2 Change Log
|
||||
2.0.33 under development
|
||||
------------------------
|
||||
|
||||
- Bug #16145: Fix `Html` helper `checkboxList()`, `radioList()`, `renderSelectOptions()`, `dropDownList()`, `listBox()` methods to work properly with traversable selection (samdark)
|
||||
- Bug #17797: Fix for `activeListInput` options (alex-code)
|
||||
- Bug #16092: Fix duplicate joins in usage of `joinWith` (germanow)
|
||||
- Bug #17679: Fix Oracle exception "ORA-01461: can bind a LONG value only for insert into a LONG column" when inserting 4k+ string (vinpel, 243083df)
|
||||
|
||||
@ -954,7 +954,7 @@ class BaseHtml
|
||||
$name .= '[]';
|
||||
}
|
||||
if (ArrayHelper::isTraversable($selection)) {
|
||||
$selection = array_map('strval', (array)$selection);
|
||||
$selection = array_map('strval', ArrayHelper::toArray($selection));
|
||||
}
|
||||
|
||||
$formatter = ArrayHelper::remove($options, 'item');
|
||||
@ -1041,7 +1041,7 @@ class BaseHtml
|
||||
public static function radioList($name, $selection = null, $items = [], $options = [])
|
||||
{
|
||||
if (ArrayHelper::isTraversable($selection)) {
|
||||
$selection = array_map('strval', (array)$selection);
|
||||
$selection = array_map('strval', ArrayHelper::toArray($selection));
|
||||
}
|
||||
|
||||
$formatter = ArrayHelper::remove($options, 'item');
|
||||
@ -1854,7 +1854,7 @@ class BaseHtml
|
||||
public static function renderSelectOptions($selection, $items, &$tagOptions = [])
|
||||
{
|
||||
if (ArrayHelper::isTraversable($selection)) {
|
||||
$selection = array_map('strval', (array)$selection);
|
||||
$selection = array_map('strval', ArrayHelper::toArray($selection));
|
||||
}
|
||||
|
||||
$lines = [];
|
||||
|
||||
Reference in New Issue
Block a user