From 7d0eedf08c7f29bbdedd33fcc529c932c8452fbb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Schl=C3=BCter?= Date: Fri, 18 Jun 2010 10:16:35 +0000 Subject: [PATCH] - Ignore empty filename for mail.log, treat it like none given --- NEWS | 2 +- ext/standard/mail.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 2.40.0