Merge pull request #22892 from OPEN-DSI/14.0_fix_update_extrafields_multiselect_type

FIX: Set extrafield value of multiselect type
This commit is contained in:
Laurent Destailleur 2023-04-10 19:11:25 +02:00 committed by GitHub
commit e629f07f17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6461,6 +6461,14 @@ abstract class CommonObject
dol_syslog('Error bad setup of extrafield', LOG_WARNING);
}
break;
case 'checkbox':
case 'chkbxlst':
if (is_array($this->array_options[$key])) {
$new_array_options[$key] = implode(',', $this->array_options[$key]);
} else {
$new_array_options[$key] = $this->array_options[$key];
}
break;
}
}
@ -6814,6 +6822,14 @@ abstract class CommonObject
}
break;
*/
case 'checkbox':
case 'chkbxlst':
if (is_array($this->array_options[$key])) {
$new_array_options[$key] = implode(',', $this->array_options[$key]);
} else {
$new_array_options[$key] = $this->array_options[$key];
}
break;
}
$this->db->begin();