Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ext/mbstring/mbstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
17 changes: 17 additions & 0 deletions ext/mbstring/tests/gh25737.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--TEST--
GH-25737 (mb_send_mail() ignores $additional_params)
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
if (PHP_OS_FAMILY === "Windows") die("skip Won't run on Windows");
?>
--INI--
sendmail_path="cat > /dev/null; echo sendmail arguments:"
--FILE--
<?php
var_dump(mb_send_mail("user@example.com", "subject", "message", [], "-fsender@example.com"));
?>
--EXPECT--
sendmail arguments: -fsender@example.com
bool(true)
Loading