diff --git a/Zend/Optimizer/zend_func_infos.h b/Zend/Optimizer/zend_func_infos.h index 574a67e1d8f..dbe4c21eb55 100644 --- a/Zend/Optimizer/zend_func_infos.h +++ b/Zend/Optimizer/zend_func_infos.h @@ -235,7 +235,7 @@ static const func_info_t func_infos[] = { F1("mb_convert_variables", MAY_BE_STRING|MAY_BE_FALSE), F1("mb_encode_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) F1("mb_regex_encoding", MAY_BE_STRING|MAY_BE_BOOL), #endif diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index 501128b7478..dc9fa907ce0 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -176,10 +176,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 {} /** - * @return array|string|int|false + * @return array|string|int|false|null * @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 {} diff --git a/ext/mbstring/mbstring_arginfo.h b/ext/mbstring/mbstring_arginfo.h index c24571a0b3c..3c3f1bf2429 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: 4071d9df39c4ec0d544edd9ff74e5d85f8863b0d */ + * Stub hash: 0fe7418224f3a0ab65a06bf215ebcb09ce632488 */ 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") @@ -187,7 +187,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_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_END_ARG_INFO() diff --git a/ext/mbstring/tests/mb_get_info_http_input.phpt b/ext/mbstring/tests/mb_get_info_http_input.phpt new file mode 100644 index 00000000000..5cfac7a8336 --- /dev/null +++ b/ext/mbstring/tests/mb_get_info_http_input.phpt @@ -0,0 +1,10 @@ +--TEST-- +mb_get_info("http_input") can return null +--EXTENSIONS-- +mbstring +--FILE-- + +--EXPECT-- +NULL