From deee0ab320a09d7022cf225d0c7f86a6ccef2a8d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 23 Jul 2024 09:25:23 +0200 Subject: [PATCH] Fix bad param of constructor --- htdocs/core/class/html.formmail.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 01c1e989ce4..cb191810031 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1765,7 +1765,7 @@ class FormMail extends Form */ public function fetchAllEMailTemplate($type_template, $user, $outputlangs, $active = 1) { - global $conf; + global $db, $conf; $sql = "SELECT rowid, module, label, topic, content, content_lines, lang, fk_user, private, position"; $sql .= " FROM ".$this->db->prefix().'c_email_templates'; @@ -1792,7 +1792,7 @@ class FormMail extends Form } } - $line = new ModelMail($dbs); + $line = new ModelMail($db); $line->id = $obj->rowid; $line->label = $obj->label; $line->lang = $obj->lang;