[CFChoice] Allow true in option 'other'

Before this commit, only the "1" value was taken into account
This commit is contained in:
Julien Fastré 2014-11-20 11:59:39 +01:00
parent 8bfa675bd4
commit ff40e2991c

View File

@ -92,7 +92,7 @@ class CustomFieldChoice implements CustomFieldInterface
);
//if allow_other = true
if ($customField->getOptions()[self::ALLOW_OTHER] === 1) {
if ($customField->getOptions()[self::ALLOW_OTHER] == true) {
$builder->add(
$builder->create($customField->getSlug(), new ChoiceWithOtherType(), $options)
->addModelTransformer(new CustomFieldDataTransformer($this, $customField)));