[php-src] master: fetch_assoc may return array_key_long
| From: | Nikita Popov | Date: | Wed, 28 Apr 2021 09:20:59 +0000 |
| Subject: | [php-src] master: fetch_assoc may return array_key_long | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-115922@lists.php.net to get a copy of this message | ||
Author: Nikita Popov (nikic)
Date: 2021-04-28T11:18:36+02:00
Commit: https://github.com/php/php-src/commit/67c4d1f5b965e2ec923fe6ebf6b5154ecd9845ce
Raw diff: https://github.com/php/php-src/commit/67c4d1f5b965e2ec923fe6ebf6b5154ecd9845ce.diff
fetch_assoc may return array_key_long
If the column name is a number (which is possible at least via
AS clauses), then symtable canonicalization will convert it into
an integer key.
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 2ff9af697bdf..d1c721a259e3 100644
--- a/ext/opcache/Optimizer/zend_func_info.c
+++ b/ext/opcache/Optimizer/zend_func_info.c
@@ -949,7 +949,7 @@ static const func_info_t func_infos[] = {
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),
F1("mysqli_fetch_array", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY |
MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
- F1("mysqli_fetch_assoc", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY |
MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
+ F1("mysqli_fetch_assoc", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY |
MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
F1("mysqli_fetch_all", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY |
MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
F1("mysqli_fetch_object", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
F0("mysqli_free_result", MAY_BE_NULL),
@@ -1363,7 +1363,7 @@ static const func_info_t func_infos[] = {
F0("pg_field_num", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
F1("pg_fetch_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("pg_fetch_row", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY |
MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
- F1("pg_fetch_assoc", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY |
MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
+ F1("pg_fetch_assoc", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY |
MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
F1("pg_fetch_array", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY |
MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
F1("pg_fetch_object", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
F1("pg_fetch_all", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY |
MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY),