Avoid send emails attachments not specified - refs BT#11729

pull/2487/head
Angel Fernando Quiroz Campos 9 years ago
parent 575ce618bc
commit d03d42bfe8
  1. 18
      main/inc/lib/api.lib.php

@ -7956,15 +7956,15 @@ function api_mail_html(
}
$o++;
}
} elseif (is_array($_FILES)) {
$data_file = $_FILES;
$o = 0;
foreach ($data_file as $file_attach) {
if (!empty($file_attach['tmp_name']) && !empty($file_attach['name'])) {
$mail->AddAttachment($file_attach['tmp_name'], $file_attach['name']);
}
$o++;
}
// } elseif (is_array($_FILES)) {
// $data_file = $_FILES;
// $o = 0;
// foreach ($data_file as $file_attach) {
// if (!empty($file_attach['tmp_name']) && !empty($file_attach['name'])) {
// $mail->AddAttachment($file_attach['tmp_name'], $file_attach['name']);
// }
// $o++;
// }
}
// Only valid addresses are accepted.

Loading…
Cancel
Save