FIX 11.0: when a new intervention is created from an object, a new $extrafields object is instantiated but not initialized
Because of this, missing mandatory extrafields are not checked and no extrafields are inserted
This commit is contained in:
parent
a0fe2a8abc
commit
35448e3307
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user