We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddc9574 commit 2353b5dCopy full SHA for 2353b5d
Form/Type/ChoiceTreeType.php
@@ -32,7 +32,8 @@ class ChoiceTreeType extends ChoiceType
32
*/
33
public function buildForm(FormBuilderInterface $builder, array $options)
34
{
35
- $choiceList = $options['choice_list']->getAdaptedList();
+ // for symfony 2.7
36
+ $choiceList = method_exists($options['choice_list'], "getAdaptedList") ? $options['choice_list']->getAdaptedList(): $options['choice_list'];
37
if (!$choiceList && !is_array($options['choices']) && !$options['choices'] instanceof \Traversable) {
38
throw new LogicException('Either the option "choices" or "choice_list" must be set.');
39
}
0 commit comments