1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.3'

* PHP-8.3:
  Return value of mb_get_info can be NULL
This commit is contained in:
Alex Dowad
2023-11-27 21:20:38 +02:00
4 changed files with 15 additions and 5 deletions

View File

@@ -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

View File

@@ -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<int|string, int|string|array>|string|int|false
* @return array<int|string, int|string|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 {}

View File

@@ -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()

View 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