mirror of
https://github.com/php/php-src.git
synced 2024-12-16 13:26:19 +08:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Return value of mb_get_info can be NULL
This commit is contained in:
commit
31d43164e8
@ -235,7 +235,7 @@ static const func_info_t func_infos[] = {
|
|||||||
F1("mb_convert_variables", MAY_BE_STRING|MAY_BE_FALSE),
|
F1("mb_convert_variables", MAY_BE_STRING|MAY_BE_FALSE),
|
||||||
F1("mb_encode_numericentity", MAY_BE_STRING),
|
F1("mb_encode_numericentity", MAY_BE_STRING),
|
||||||
F1("mb_decode_numericentity", MAY_BE_STRING),
|
F1("mb_decode_numericentity", MAY_BE_STRING),
|
||||||
F1("mb_get_info", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE),
|
F1("mb_get_info", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_NULL),
|
||||||
#if defined(HAVE_MBREGEX)
|
#if defined(HAVE_MBREGEX)
|
||||||
F1("mb_regex_encoding", MAY_BE_STRING|MAY_BE_BOOL),
|
F1("mb_regex_encoding", MAY_BE_STRING|MAY_BE_BOOL),
|
||||||
#endif
|
#endif
|
||||||
|
@ -170,10 +170,10 @@ function mb_decode_numericentity(string $string, array $map, ?string $encoding =
|
|||||||
function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_params = null): bool {}
|
function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_params = null): bool {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array<int|string, int|string|array>|string|int|false
|
* @return array<int|string, int|string|array>|string|int|false|null
|
||||||
* @refcount 1
|
* @refcount 1
|
||||||
*/
|
*/
|
||||||
function mb_get_info(string $type = "all"): array|string|int|false {}
|
function mb_get_info(string $type = "all"): array|string|int|false|null {}
|
||||||
|
|
||||||
function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool {}
|
function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool {}
|
||||||
|
|
||||||
|
4
ext/mbstring/mbstring_arginfo.h
generated
4
ext/mbstring/mbstring_arginfo.h
generated
@ -1,5 +1,5 @@
|
|||||||
/* This is a generated file, edit the .stub.php file instead.
|
/* This is a generated file, edit the .stub.php file instead.
|
||||||
* Stub hash: 141073d610f862b525406fb7f48ac58b6691080e */
|
* Stub hash: ff85f7aa54b972002d6f9d733dc52328c7b79c1d */
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_language, 0, 0, MAY_BE_STRING|MAY_BE_BOOL)
|
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")
|
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, language, IS_STRING, 1, "null")
|
||||||
@ -177,7 +177,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_send_mail, 0, 3, _IS_BOOL, 0)
|
|||||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_params, IS_STRING, 1, "null")
|
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, additional_params, IS_STRING, 1, "null")
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_get_info, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_get_info, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_NULL)
|
||||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "\"all\"")
|
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "\"all\"")
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
|
10
ext/mbstring/tests/mb_get_info_http_input.phpt
Normal file
10
ext/mbstring/tests/mb_get_info_http_input.phpt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--TEST--
|
||||||
|
mb_get_info("http_input") can return null
|
||||||
|
--EXTENSIONS--
|
||||||
|
mbstring
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
var_dump(mb_get_info("http_input"));
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
NULL
|
Loading…
Reference in New Issue
Block a user