]> granicus.if.org Git - php/commitdiff
Make mb_send_mail() consistent with mail()
authorMáté Kocsis <kocsismate@woohoolabs.com>
Mon, 14 Sep 2020 09:52:33 +0000 (11:52 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Mon, 14 Sep 2020 09:52:33 +0000 (11:52 +0200)
The $additional_headers parameter shouldn't accept null.

ext/mbstring/mbstring.c
ext/mbstring/mbstring.stub.php
ext/mbstring/mbstring_arginfo.h

index 1189270bec61c9665d6c81968584a5debc712063..58797eb24450b8b598c57e3ce530393c10731573 100644 (file)
@@ -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();
 
index d089c24c194cb8215bd682ec1079de673f9e3934..3be9aad66c85ba16b7da70146297f5e62c72a384 100644 (file)
@@ -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 {}
 
index 873a0c86a45cc2975a638d69630cbf419b4f3e74..8bea3306f2eac1fbb30e944e86e495ce27fff723 100644 (file)
@@ -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()