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,7 +200,11 @@ if (empty($reshook))
// Fill array 'array_options' with data from add form // Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost($extralabels,$object); $ret = $extrafields->setOptionalsFromPost($extralabels,$object);
if ($ret < 0) $error++; if ($ret < 0)
{
$error++;
$action = 'create';
}
if (! GETPOST("lastname")) if (! GETPOST("lastname"))
{ {