diff --git a/CHANGELOG.md b/CHANGELOG.md index 1688607..e900113 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - `data` and `files` were wrongly exposed on `Form` class. Changed visibility to private and added `getData` and `getFiles` methods. - Allow non-required file fields + - Fixed choice field values check ## [2.0.3] - 2017-12-13 ### Added diff --git a/src/Widgets/ChoiceWidget.php b/src/Widgets/ChoiceWidget.php index 02c18bc..1579153 100644 --- a/src/Widgets/ChoiceWidget.php +++ b/src/Widgets/ChoiceWidget.php @@ -175,7 +175,7 @@ protected function formatValue($value) $values[] = parent::formatValue($v); } } else { - $values = !empty($value) ? [parent::formatValue($value)] : []; + $values = $value !== false ? [parent::formatValue($value)] : []; } return $values;