diff --git a/NEWS b/NEWS index ea57424282cc..b221b1a37e10 100644 --- a/NEWS +++ b/NEWS @@ -102,6 +102,8 @@ PHP NEWS deeply nested arrays. (Eyüp Can Akman) . Fixed the JIT freeing the string returned by mb_encode_mimeheader() or mb_output_handler() while it is still in use. (Ilia Alshanetsky) + . Fixed bug GH-25737 (mb_send_mail() ignores $additional_params). + (Tomasz Kowalczyk) - Opcache: . Fixed bug GH-22216 (spurious opcache.memory_consumption warning on each new diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index d2e17d6c0bc4..88e7d7f5f832 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4848,7 +4848,7 @@ PHP_FUNCTION(mb_send_mail) str_headers = smart_str_extract(&str); - zend_string *force_extra_parameters = zend_ini_str_literal("mail.force_extra_parameters"); + zend_string *force_extra_parameters = zend_ini_str_ex(ZEND_STRL("mail.force_extra_parameters"), false, NULL); if (force_extra_parameters) { extra_cmd = php_escape_shell_cmd(force_extra_parameters); } else if (extra_cmd) { diff --git a/ext/mbstring/tests/gh25737.phpt b/ext/mbstring/tests/gh25737.phpt new file mode 100644 index 000000000000..6118c812b356 --- /dev/null +++ b/ext/mbstring/tests/gh25737.phpt @@ -0,0 +1,17 @@ +--TEST-- +GH-25737 (mb_send_mail() ignores $additional_params) +--EXTENSIONS-- +mbstring +--SKIPIF-- + +--INI-- +sendmail_path="cat > /dev/null; echo sendmail arguments:" +--FILE-- + +--EXPECT-- +sendmail arguments: -fsender@example.com +bool(true)