Fix: formmail - add_attached_files - argument name consistency (#27338)
# Fix: formmail - add_attached_files - argument name consistency Phan determined suspicious naming as arg #2 to add_attached_files is while that was the name for the first argument by the caller. Also, on examination, only the first parameter is needed as add_attached_files handles the other two in the same manner.
This commit is contained in:
parent
95da30a224
commit
da0bebc9ae
1 changed files with 3 additions and 3 deletions
|
|
@ -440,9 +440,9 @@ class FormMail extends Form
|
|||
|
||||
if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelselected') && GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1')) {
|
||||
if (!empty($arraydefaultmessage->joinfiles) && !empty($this->param['fileinit']) && is_array($this->param['fileinit'])) {
|
||||
foreach ($this->param['fileinit'] as $file) {
|
||||
if (!empty($file)) {
|
||||
$this->add_attached_files($file, basename($file), dol_mimetype($file));
|
||||
foreach ($this->param['fileinit'] as $path) {
|
||||
if (!empty($path)) {
|
||||
$this->add_attached_files($path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue