2
0
forked from Wavyzz/dolibarr

Merge pull request #16074 from ATM-Consulting/11.0_FIX_wrong_extrafield_insertion_when_creating_intervention

FIX 11.0: when a new intervention is created from an object, a new $e…
This commit is contained in:
Laurent Destailleur
2021-01-27 19:35:05 +01:00
committed by GitHub

View File

@@ -258,7 +258,13 @@ if (empty($reshook))
}
// Extrafields
$extrafields = new ExtraFields($db);
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);
if ($ret < 0) {
$error++;
$action = 'create';
}
$array_options = $extrafields->getOptionalsFromPost($object->table_element);
$object->array_options = $array_options;