diff --git a/include/class.forms.php b/include/class.forms.php
index 7078692a0884ddae59a91cb65c5edce6c8fbbee4..5ac0738d6f417711bfac222007446d1b4e4c1372 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -1948,8 +1948,11 @@ class CheckboxWidget extends Widget {
 
     function getValue() {
         $data = $this->field->getSource();
-        if (count($data))
+        if (count($data)) {
+            if (!isset($data[$this->name]))
+                return false;
             return @in_array($this->field->get('id'), $data[$this->name]);
+        }
         return parent::getValue();
     }