fix CI v21 html.formmail.class.php (#35760)

This commit is contained in:
Frédéric FRANCE 2025-10-14 22:53:25 +02:00 committed by GitHub
parent 2e644b8420
commit f6db1af7a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2437,7 +2437,7 @@ class ModelMail extends CommonObject
{
// The table llx_c_email_templates has no field ref. The field ref was named "label" instead. So we change the call to fetchCommon.
//$result = $this->fetchCommon($id, $ref, '', $noextrafields);
$this->fetchCommon($id, '', (empty($ref) ? '' : " AND t.label = '".$this->db->escape($ref)."'"), $noextrafields);
$result = $this->fetchCommon($id, '', (empty($ref) ? '' : " AND t.label = '".$this->db->escape($ref)."'"), $noextrafields);
if ($result > 0 && !empty($this->table_element_line) && empty($nolines)) {
$this->fetchLines($noextrafields);