From 4e05ac84f147b878e80f890646ec71f08f85af11 Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 13 Mar 2024 21:55:43 +0100 Subject: [PATCH] Init code_client and code_fournisseur to '', not null --- htdocs/societe/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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