From ea6f751fd3a27457613aad536088c8ea0675a73e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Sep 2022 14:21:36 +0200 Subject: [PATCH] Update card.php --- htdocs/societe/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index d56f9419989..723ff70139d 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -602,7 +602,7 @@ if (empty($reshook)) { $result = $object->create($user); - if (empty($error) && !empty($conf->mailing->enabled) && !empty($object->email)) { + if (empty($error) && !empty($conf->mailing->enabled) && !empty($object->email) && !empty($object->no_email)) { // Add mass emailing flag into table mailing_unsubscribe $result = $object->setNoEmail($object->no_email); if ($result < 0) {