Merge pull request #19834 from dolibarr95/patch-59

Update extrafields.class.php
This commit is contained in:
Laurent Destailleur 2022-01-14 10:16:32 +01:00 committed by GitHub
commit 256b4fb06b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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