Cast the group name as a string
This allows the options to be grouped by association fields.
This commit is contained in:
parent
fb2ce7a171
commit
d685d7d08b
@ -128,11 +128,13 @@ class ObjectChoiceList extends ChoiceList
|
||||
if (null === $group) {
|
||||
$groupedChoices[$i] = $choice;
|
||||
} else {
|
||||
if (!isset($groupedChoices[$group])) {
|
||||
$groupedChoices[$group] = array();
|
||||
$groupName = (string) $group;
|
||||
|
||||
if (!isset($groupedChoices[$groupName])) {
|
||||
$groupedChoices[$groupName] = array();
|
||||
}
|
||||
|
||||
$groupedChoices[$group][$i] = $choice;
|
||||
$groupedChoices[$groupName][$i] = $choice;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user