diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 754d2460fc9..18ecc3db457 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -130,8 +130,8 @@ if ($action == 'update' && !empty($permissiontoadd)) } elseif ($object->fields[$key]['type'] == 'boolean') { if (!GETPOSTISSET($key)) { - $object->$key = null; - continue; // The field was not submited to be edited + $object->$key = 0; // use 0 instead null if the field is defined as not null + continue; } }