diff --git a/docs/NEWS b/docs/NEWS index b4be71d1..f8247731 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -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) diff --git a/include/functions.inc.php b/include/functions.inc.php index ad6faf23..ce96a5d4 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -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'])); } }