Update contact.php

fix for issue #16985
This commit is contained in:
asolslk 2021-03-27 16:05:42 +08:00 committed by GitHub
parent 4a22c8e87e
commit 992a4c7c21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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