Permalink
Browse files

BUGFIX: return null data from checkbox field if not set. Fixes issue …

…with validation using str_len() to determine valid field. FIXES: http://open.silverstripe.org/ticket/6231. Thanks natmchugh
  • Loading branch information...
1 parent 6956275 commit 771e93ef18858a0a4ab1088d0678ce9e4fca75df @wilr wilr committed May 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 forms/CheckboxField.php
View
@@ -13,7 +13,7 @@ function setValue($value) {
}
function dataValue() {
- return ($this->value) ? 1 : 0;
+ return ($this->value) ? 1 : NULL;
}
function Value() {

0 comments on commit 771e93e

Please sign in to comment.