From a08c468a5e7f247e80d0a145333704aa04c65e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ili=C3=A8s=20BENYAHIA?= Date: Tue, 20 Dec 2022 11:00:41 +0100 Subject: [PATCH] When no language selected, value is 0 so it enters in the condition filter_lang != '' anyway --- htdocs/core/modules/mailings/contacts1.modules.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index decbc81716b..38a82907124 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -408,7 +408,7 @@ class mailing_contacts1 extends MailingTargets } // Filter on language - if ($filter_lang != '') { + if (!empty($filter_lang)) { $sql .= " AND sp.default_lang = '".$this->db->escape($filter_lang)."'"; } @@ -439,7 +439,6 @@ class mailing_contacts1 extends MailingTargets $sql .= " ORDER BY sp.email"; // print "wwwwwwx".$sql; - // Stocke destinataires dans cibles $result = $this->db->query($sql); if ($result) {