Skip to content

Commit

Permalink
Merge pull request Dolibarr#27845 from vmaury/Fix_random_bug_when_att…
Browse files Browse the repository at this point in the history
…ach_file_to_a_mail

Fix : random bug when attaching file to email : no file attached
  • Loading branch information
eldy authored Jan 29, 2024
2 parents a6e4ce0 + e66d9dd commit c57e16d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/class/CMailFile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1644,9 +1644,9 @@ private function write_files($filename_list, $mimetype_list, $mimefilename_list,
$filename_list_size = count($filename_list);
for ($i = 0; $i < $filename_list_size; $i++) {
if ($filename_list[$i]) {
dol_syslog("CMailFile::write_files: i=$i");
dol_syslog("CMailFile::write_files: i=$i ".$filename_list[$i]);
$encoded = $this->_encode_file($filename_list[$i]);
if ($encoded >= 0) {
if ($encoded !== -1) {
if ($mimefilename_list[$i]) {
$filename_list[$i] = $mimefilename_list[$i];
}
Expand Down

0 comments on commit c57e16d

Please sign in to comment.