fix for issue #16985

This commit is contained in:
Nicolas 2022-06-01 10:42:29 +02:00
parent 85e2fe40b1
commit 4696cd33d5

View File

@ -58,7 +58,8 @@ if ($action == 'addcontact' && $permissiontoedit)
if ($result > 0 && $id > 0)
{
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
$result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
$result = $object->add_contact($contactid, $typeid, GETPOST("source"));
}
if ($result >= 0)