FIX : create contact with extrafiel is null when it is require

This commit is contained in:
phf 2015-05-25 17:36:36 +02:00
parent fe2329518b
commit 7b163d3b29

View File

@ -200,8 +200,12 @@ if (empty($reshook))
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
if ($ret < 0) $error++;
if ($ret < 0)
{
$error++;
$action = 'create';
}
if (! GETPOST("lastname"))
{
$error++; $errors[]=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label"));