diff --git a/class/boolfield.php b/class/boolfield.php index eac09b660c49a6e6e9ddbbc335397a41f2785f96..c1407b92dbfff5350d4ba46fcdc5ed3eb992a25b 100644 --- a/class/boolfield.php +++ b/class/boolfield.php @@ -12,9 +12,10 @@ class BoolField extends Field public function validate() { - $this->value = $POST[$this->name]; - if (!is_bool($this->value)) - return false; + if (isset($_POST[$this->name])) + $this->value = $_POST[$this->name]; + else + $this->value = NULL; return true; } }