From: Johannes Schlüter Date: Fri, 18 Jun 2010 10:16:35 +0000 (+0000) Subject: - Ignore empty filename for mail.log, treat it like none given X-Git-Tag: php-5.3.3RC2~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d0eedf08c7f29bbdedd33fcc529c932c8452fbb;p=php - Ignore empty filename for mail.log, treat it like none given --- diff --git a/NEWS b/NEWS index 7c23e3d8d7..2ea4eb504a 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2010, PHP 5.3.3 RC2 - +- Fixed the mail.log ini setting when no filename was given. (Johannes) 17 Jun 2010, PHP 5.3.3 RC1 - Upgraded bundled sqlite to version 3.6.23.1. (Ilia) diff --git a/ext/standard/mail.c b/ext/standard/mail.c index d9deb5c84a..7b4e89758a 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -220,7 +220,7 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char } \ return val; \ - if (mail_log) { + if (mail_log && *mail_log) { char *tmp; int l = spprintf(&tmp, 0, "mail() on [%s:%d]: To: %s -- Headers: %s\n", zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : ""); php_stream *stream = php_stream_open_wrapper(mail_log, "a", IGNORE_URL_WIN | REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR, NULL);