diff --git a/htdocs/user/card.php b/htdocs/user/card.php index d71922cbfd5..2325ab7ab53 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -538,7 +538,7 @@ if (empty($reshook)) { if (!empty($contact->socid)) { $sql .= ", fk_soc=".((int) $contact->socid); } elseif ($socid > 0) { - $sql .= ", fk_soc=''"; + $sql .= ", fk_soc = null"; setEventMessages($langs->trans("WarningUserDifferentContactSocid"), '', 'warnings'); // Add message if post socid != $contact->socid } $sql .= " WHERE rowid = ".((int) $object->id);