on InlineImageExists make sure there is at least one attachment

This commit is contained in:
Klaus Leithoff 2013-05-06 14:37:23 +00:00
parent 7e00a006d7
commit e8852dc8f3

View File

@ -1972,7 +1972,7 @@ class PHPMailer {
* @return bool * @return bool
*/ */
public function InlineImageExists($matchall = false) { public function InlineImageExists($matchall = false) {
$i=0; $i=0;
foreach($this->attachment as $attachment) { foreach($this->attachment as $attachment) {
if ($attachment[6] == 'inline') { if ($attachment[6] == 'inline') {
if ($matchall) { if ($matchall) {
@ -1982,7 +1982,7 @@ class PHPMailer {
} }
} }
} }
return ($matchall?($i===count($this->attachment)):false); return ($matchall?($i>0 && $i===count($this->attachment)):false);
} }
///////////////////////////////////////////////// /////////////////////////////////////////////////