FIX : backport commit 5b3fcc5e43, chkbxlst cannot be emptied

This commit is contained in:
Gauthier PC portable 024 2022-07-08 10:35:43 +02:00
parent e60c6ae96d
commit d375c9fbbe

View File

@ -2072,7 +2072,7 @@ class ExtraFields
if (!empty($onlykey) && $onlykey != '@GETPOSTISSET' && $key != $onlykey) {
continue;
}
if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && $this->attributes[$object->table_element]['type'][$key] != 'boolean') {
if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && (! in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'chkbxlst')))) {
//when unticking boolean field, it's not set in POST
continue;
}