Skip to content

Commit 7350e80

Browse files
TysonAndrenikic
authored andcommitted
Fix bug in opcache flags for mysqli_get_charset
https://www.php.net/manual/en/mysqli.get-charset.php tests/mysqli_field_seek.phpt has a test of this returning an object. Looking at the source in ext/mysqli/mysqli_nonapi.c, this should be object|null, not array|null This might actually cause bugs in opcache's inferences, (no proof of this) so it might make sense to pull this patch into an earlier minor version.
1 parent bcf2096 commit 7350e80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/Optimizer/zend_func_info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ static const func_info_t func_infos[] = {
10191019
F1("mysqli_query", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_OBJECT),
10201020
F0("mysqli_multi_query", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
10211021
F0("mysqli_set_charset", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1022-
F1("mysqli_get_charset", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
1022+
F1("mysqli_get_charset", MAY_BE_NULL | MAY_BE_OBJECT),
10231023
F0("mysqli_begin_transaction", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
10241024
F0("mysqli_savepoint", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
10251025
F0("mysqli_release_savepoint", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),

0 commit comments

Comments
 (0)