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.
This commit is contained in:
Tyson Andre 2019-06-09 16:35:34 -04:00 committed by Nikita Popov
parent bcf20963c1
commit 7350e808c5

View File

@ -1019,7 +1019,7 @@ static const func_info_t func_infos[] = {
F1("mysqli_query", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_OBJECT),
F0("mysqli_multi_query", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
F0("mysqli_set_charset", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
F1("mysqli_get_charset", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
F1("mysqli_get_charset", MAY_BE_NULL | MAY_BE_OBJECT),
F0("mysqli_begin_transaction", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
F0("mysqli_savepoint", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
F0("mysqli_release_savepoint", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),