From ff40e2991c92aba74c763aec7ed6b95505fafb84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 20 Nov 2014 11:59:39 +0100 Subject: [PATCH] [CFChoice] Allow true in option 'other' Before this commit, only the "1" value was taken into account --- CustomFields/CustomFieldChoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CustomFields/CustomFieldChoice.php b/CustomFields/CustomFieldChoice.php index cc4795963..907b44817 100644 --- a/CustomFields/CustomFieldChoice.php +++ b/CustomFields/CustomFieldChoice.php @@ -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)));