diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 8eda5988f80..52921b28c80 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -562,12 +562,12 @@ if (empty($reshook)) { } else { if ($result == -3 && in_array('ErrorCustomerCodeAlreadyUsed', $object->errors)) { $duplicate_code_error = true; - $object->code_client = null; + $object->code_client = ''; } if ($result == -3 && in_array('ErrorSupplierCodeAlreadyUsed', $object->errors)) { $duplicate_code_error = true; - $object->code_fournisseur = null; + $object->code_fournisseur = ''; } if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { // TODO Sometime errors on duplicate on profid and not on code, so we must manage this case