summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-09-14 11:52:33 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-09-14 11:52:33 +0200
commit1c81a3456372693dc4036fd7a3deb143cbb3aeef (patch)
tree4c1c833af9a900f1618668d9d15ec8bec4242a4b /ext
parenteb86d0812867833d4f9c8a82997cd54249549027 (diff)
downloadphp-git-1c81a3456372693dc4036fd7a3deb143cbb3aeef.tar.gz
Make mb_send_mail() consistent with mail()
The $additional_headers parameter shouldn't accept null.
Diffstat (limited to 'ext')
-rw-r--r--ext/mbstring/mbstring.c2
-rw-r--r--ext/mbstring/mbstring.stub.php2
-rw-r--r--ext/mbstring/mbstring_arginfo.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 1189270bec..58797eb244 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -3488,7 +3488,7 @@ PHP_FUNCTION(mb_send_mail)
Z_PARAM_PATH(subject, subject_len)
Z_PARAM_PATH(message, message_len)
Z_PARAM_OPTIONAL
- Z_PARAM_ARRAY_HT_OR_STR_OR_NULL(headers_ht, str_headers)
+ Z_PARAM_ARRAY_HT_OR_STR(headers_ht, str_headers)
Z_PARAM_PATH_STR_OR_NULL(extra_cmd)
ZEND_PARSE_PARAMETERS_END();
diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php
index d089c24c19..3be9aad66c 100644
--- a/ext/mbstring/mbstring.stub.php
+++ b/ext/mbstring/mbstring.stub.php
@@ -77,7 +77,7 @@ function mb_encode_numericentity(string $string, array $convmap, ?string $encodi
function mb_decode_numericentity(string $string, array $convmap, ?string $encoding = null): string {}
-function mb_send_mail(string $to, string $subject, string $message, array|string|null $additional_headers = null, ?string $additional_parameters = null): bool {}
+function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_parameters = null): bool {}
function mb_get_info(string $type = "all"): array|string|int|false {}
diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h
index 873a0c86a4..8bea3306f2 100644
--- a/ext/mbstring/mbstring_arginfo.h
+++ b/ext/mbstring/mbstring_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 84096daa0fd395f57401f11e9e79f7c8420e8a93 */
+ * Stub hash: 442b9dc473714c91663fcd530214935ba74302e4 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_language, 0, 0, MAY_BE_STRING|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, language, IS_STRING, 1, "null")
@@ -178,7 +178,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_send_mail, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, to, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, subject, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
- ZEND_ARG_TYPE_MASK(0, additional_headers, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null")
+ ZEND_ARG_TYPE_MASK(0, additional_headers, MAY_BE_ARRAY|MAY_BE_STRING, "[]")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_parameters, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()