Skip to content

Commit

Permalink
Improve condition
Browse files Browse the repository at this point in the history
  • Loading branch information
LadySolveig committed Jul 22, 2024
1 parent eddb3c1 commit d049ca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/src/Mail/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ public function addAttachment($path, $name = '', $encoding = 'base64', $type = '
}

foreach ($path as $key => $file) {
if (is_array($name)) {
if (isset($name[$key])) {
$result = parent::addAttachment($file, $name[$key], $encoding, $type, $disposition);
} else {
$result = parent::addAttachment($file, basename($file), $encoding, $type, $disposition);
Expand Down

0 comments on commit d049ca1

Please sign in to comment.