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
commit e431b5aacb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;