Skip to content

Commit 953502c

Browse files
authored
Merge pull request #23 from dipcode-software/fix/choice_field
Fixed value check
2 parents 9536357 + 5e3b6a0 commit 953502c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
### Fixed
99
- `data` and `files` were wrongly exposed on `Form` class. Changed visibility to private and added `getData` and `getFiles` methods.
1010
- Allow non-required file fields
11+
- Fixed choice field values check
1112

1213
## [2.0.3] - 2017-12-13
1314
### Added

src/Widgets/ChoiceWidget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ protected function formatValue($value)
175175
$values[] = parent::formatValue($v);
176176
}
177177
} else {
178-
$values = !empty($value) ? [parent::formatValue($value)] : [];
178+
$values = $value !== false ? [parent::formatValue($value)] : [];
179179
}
180180

181181
return $values;

0 commit comments

Comments
 (0)