cvs: php-src /ext/mbstring mbstring.c
| From: | Ilia Alshanetsky | Date: | Wed, 21 Sep 2005 13:15:24 +0000 |
| Subject: | cvs: php-src /ext/mbstring mbstring.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-34060@lists.php.net to get a copy of this message | ||
iliaa Wed Sep 21 09:15:24 2005 EDT
Modified files:
/php-src/ext/mbstring mbstring.c
Log:
Fixed bug #34565 (mb_send_mail does not fetch mail.force_extra_parameters)
http://cvs.php.net/diff.php/php-src/ext/mbstring/mbstring.c?r1=1.224&r2=1.225&ty=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.224 php-src/ext/mbstring/mbstring.c:1.225
--- php-src/ext/mbstring/mbstring.c:1.224 Wed Aug 3 10:07:24 2005
+++ php-src/ext/mbstring/mbstring.c Wed Sep 21 09:15:20 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.c,v 1.224 2005/08/03 14:07:24 sniper Exp $ */
+/* $Id: mbstring.c,v 1.225 2005/09/21 13:15:20 iliaa Exp $ */
/*
* PHP 4 Multibyte String module "mbstring"
@@ -3007,6 +3007,7 @@
int subject_len;
char *extra_cmd=NULL;
int extra_cmd_len;
+ char *force_extra_parameters = INI_STR("mail.force_extra_parameters");
struct {
int cnt_type:1;
int cnt_trans_enc:1;
@@ -3208,12 +3209,21 @@
mbfl_memory_device_output('\0', &device);
headers = (char *)device.buffer;
+ if (force_extra_parameters) {
+ extra_cmd = estrdup(force_extra_parameters);
+ } else if (extra_cmd) {
+ extra_cmd = php_escape_shell_cmd(extra_cmd);
+ }
+
if (!err && php_mail(to, subject, message, headers, extra_cmd TSRMLS_CC)) {
RETVAL_TRUE;
} else {
RETVAL_FALSE;
}
+ if (extra_cmd) {
+ efree(extra_cmd);
+ }
if (subject_buf) {
efree((void *)subject_buf);
}