Skip to content

Commit 7ad5999

Browse files
committed
Pull zend_string* from INI directive
1 parent cc6d952 commit 7ad5999

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/mbstring/mbstring.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4435,7 +4435,6 @@ PHP_FUNCTION(mb_send_mail)
44354435
zend_string *str_headers = NULL;
44364436
size_t i;
44374437
char *to_r = NULL;
4438-
char *force_extra_parameters = INI_STR("mail.force_extra_parameters");
44394438
bool suppress_content_type = false;
44404439
bool suppress_content_transfer_encoding = false;
44414440

@@ -4653,8 +4652,9 @@ PHP_FUNCTION(mb_send_mail)
46534652

46544653
str_headers = smart_str_extract(&str);
46554654

4655+
zend_string *force_extra_parameters = zend_ini_str_ex("mail.force_extra_parameters", strlen("mail.force_extra_parameters"), false, NULL);
46564656
if (force_extra_parameters) {
4657-
extra_cmd = php_escape_shell_cmd(force_extra_parameters);
4657+
extra_cmd = php_escape_shell_cmd(ZSTR_VAL(force_extra_parameters));
46584658
} else if (extra_cmd) {
46594659
extra_cmd = php_escape_shell_cmd(ZSTR_VAL(extra_cmd));
46604660
}

ext/standard/mail.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ PHP_FUNCTION(mail)
247247
HashTable *headers_ht = NULL;
248248
size_t to_len, message_len;
249249
size_t subject_len, i;
250-
char *force_extra_parameters = INI_STR("mail.force_extra_parameters");
251250
char *to_r, *subject_r;
252251

253252
ZEND_PARSE_PARAMETERS_START(3, 5)
@@ -312,8 +311,9 @@ PHP_FUNCTION(mail)
312311
subject_r = subject;
313312
}
314313

314+
zend_string *force_extra_parameters = zend_ini_str_ex("mail.force_extra_parameters", strlen("mail.force_extra_parameters"), false, NULL);
315315
if (force_extra_parameters) {
316-
extra_cmd = php_escape_shell_cmd(force_extra_parameters);
316+
extra_cmd = php_escape_shell_cmd(ZSTR_VAL(force_extra_parameters));
317317
} else if (extra_cmd) {
318318
extra_cmd = php_escape_shell_cmd(ZSTR_VAL(extra_cmd));
319319
}

0 commit comments

Comments
 (0)