From 0f0d0e44fd4264bdca97d5b67c8b599bfb1f69df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 30 Nov 2023 17:45:41 +0100 Subject: [PATCH] fix hidden phpstan error (#26889) --- htdocs/core/modules/mailings/contacts1.modules.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 8452dacce1e..1e2af0fcc2f 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -93,6 +93,8 @@ class mailing_contacts1 extends MailingTargets */ public function getNbOfRecipients($sql = '') { + global $conf; + $sql = "SELECT count(distinct(c.email)) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as c"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = c.fk_soc";