* Do not send mails, if the "To:" address is empty, might happen

if authors do not have a mail account entered in their profile.
      (nealk)
This commit is contained in:
Garvin Hicking 2009-09-21 08:11:35 +00:00
parent 518bde82b2
commit 1e95b899c6
2 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,10 @@ Version 1.5 ()
* Also use htmlspecialchars() for the Recent Entries sidebar plugin
(Anson)
* Do not send mails, if the "To:" address is empty, might happen
if authors do not have a mail account entered in their profile.
(nealk)
* Fixed Spartacus download URLs for SF.Net mirror (christian_boltz)
* Allow redirects when fetching remote images (garvinhicking)

View File

@ -541,7 +541,7 @@ function serendipity_sendMail($to, $subject, $message, $fromMail, $headers = NUL
fclose($fp);
}
if (!isset($maildata['skip_native'])) {
if (!isset($maildata['skip_native']) && !empty($maildata['to'])) {
return mail($maildata['to'], $maildata['subject'], $maildata['message'], implode("\n", $maildata['headers']));
}
}