com php-src: Fix bug in opcache flags for mysqli_get_charse t: ext/opcache/Optimizer/zend_func_info.c
| From: | Nikita Popov | Date: | Tue, 11 Jun 2019 13:39:59 +0000 |
| Subject: | com php-src: Fix bug in opcache flags for mysqli_get_charse t: ext/opcache/Optimizer/zend_func_info.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106672@lists.php.net to get a copy of this message | ||
Commit: 7350e808c539ac284b81904730bde11a96b0ab01
Author: Tyson Andre <tysonandre775@hotmail.com> Sun, 9 Jun 2019 16:35:34 -0400
Committer: Nikita Popov <nikita.ppv@gmail.com> Tue, 11 Jun 2019 15:39:59 +0200
Parents: bcf20963c10ffdb8d0cf3adafcf440a3e6d6484c
Branches: PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7350e808c539ac284b81904730bde11a96b0ab01
Log:
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.
Changed paths:
M ext/opcache/Optimizer/zend_func_info.c
Diff:
diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c
index 0908d1d..2217dac 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),