Skip to content

Commit 26b4130

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: Return value of mb_get_info can be NULL
2 parents 2ef4785 + 31d4316 commit 26b4130

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

Zend/Optimizer/zend_func_infos.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ static const func_info_t func_infos[] = {
235235
F1("mb_convert_variables", MAY_BE_STRING|MAY_BE_FALSE),
236236
F1("mb_encode_numericentity", MAY_BE_STRING),
237237
F1("mb_decode_numericentity", MAY_BE_STRING),
238-
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),
238+
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),
239239
#if defined(HAVE_MBREGEX)
240240
F1("mb_regex_encoding", MAY_BE_STRING|MAY_BE_BOOL),
241241
#endif

ext/mbstring/mbstring.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ function mb_decode_numericentity(string $string, array $map, ?string $encoding =
176176
function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_params = null): bool {}
177177

178178
/**
179-
* @return array<int|string, int|string|array>|string|int|false
179+
* @return array<int|string, int|string|array>|string|int|false|null
180180
* @refcount 1
181181
*/
182-
function mb_get_info(string $type = "all"): array|string|int|false {}
182+
function mb_get_info(string $type = "all"): array|string|int|false|null {}
183183

184184
function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool {}
185185

ext/mbstring/mbstring_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--TEST--
2+
mb_get_info("http_input") can return null
3+
--EXTENSIONS--
4+
mbstring
5+
--FILE--
6+
<?php
7+
var_dump(mb_get_info("http_input"));
8+
?>
9+
--EXPECT--
10+
NULL

0 commit comments

Comments
 (0)