Fix warning

This commit is contained in:
Laurent Destailleur 2024-05-17 03:48:55 +02:00
parent ce0e521a98
commit 05ed5dbe6a

View file

@ -321,7 +321,7 @@ class CMailFile
$this->atleastoneimage = 1;
if ($this->html_images[$i]['type'] == 'cidfromdata') {
if (!in_array($this->html_images[$i]['fullpath'], $filename_list)) {
// If this file path is not already into the $filename_list, we add it.
// If this file path is not already into the $filename_list, we append it at end of array
$posindice = count($filename_list);
$filename_list[$posindice] = $this->html_images[$i]['fullpath'];
$mimetype_list[$posindice] = $this->html_images[$i]['content_type'];
@ -345,7 +345,7 @@ class CMailFile
foreach ($filename_list as $i => $val) {
if ($filename_list[$i]) {
$this->atleastonefile = 1;
dol_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i]." cid_list[$i]=".$cid_list[$i], LOG_DEBUG);
dol_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i]." cid_list[$i]=".(empty($cid_list[$i]) ? '' : $cid_list[$i]), LOG_DEBUG);
}
}
}