Remove warning

This commit is contained in:
Laurent Destailleur 2020-12-01 11:35:30 +01:00
parent e689df8359
commit 3b3f9acdbb

View File

@ -58,6 +58,8 @@ class CMailFile
public $alternative_boundary;
public $deliveryreceipt;
public $atleastonefile;
public $eol;
public $eol2;
@ -338,8 +340,7 @@ class CMailFile
$text_body = $this->write_body($msg);
// Add attachments to text_encoded
if ($this->atleastonefile)
{
if (!empty($this->atleastonefile)) {
$files_encoded = $this->write_files($filename_list, $mimetype_list, $mimefilename_list);
}
@ -401,7 +402,7 @@ class CMailFile
}
}
if ($this->atleastonefile)
if (!empty($this->atleastonefile))
{
foreach ($filename_list as $i => $val)
{
@ -530,7 +531,7 @@ class CMailFile
$this->message->addPart(dol_nl2br($msg), 'text/html');
}
if ($this->atleastonefile)
if (!empty($this->atleastonefile))
{
foreach ($filename_list as $i => $val)
{