]> granicus.if.org Git - php/commitdiff
- Ignore empty filename for mail.log, treat it like none given
authorJohannes Schlüter <johannes@php.net>
Fri, 18 Jun 2010 10:16:35 +0000 (10:16 +0000)
committerJohannes Schlüter <johannes@php.net>
Fri, 18 Jun 2010 10:16:35 +0000 (10:16 +0000)
NEWS
ext/standard/mail.c

diff --git a/NEWS b/NEWS
index 7c23e3d8d7e724dc7182ac7e021079f85edabad2..2ea4eb504a9bafc1c88ac4a03647a733999d51cf 100644 (file)
--- 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)
index d9deb5c84a71c3711e2dc6ade29809fd8a5ee2f4..7b4e89758a47318fe451502e8cecd134512fbd4c 100644 (file)
@@ -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);