From 7350e808c539ac284b81904730bde11a96b0ab01 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Sun, 9 Jun 2019 16:35:34 -0400 Subject: [PATCH] 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. --- ext/opcache/Optimizer/zend_func_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 0908d1da1f..2217dac459 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -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), -- 2.40.0