File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -3251,10 +3251,11 @@ static zend_always_inline int _zend_update_type_info(
32513251 tmp |= t1 & (MAY_BE_RC1 |MAY_BE_RCN );
32523252 }
32533253 }
3254- if (opline -> opcode == ZEND_FETCH_DIM_RW
3254+ if ((key_type & (MAY_BE_ARRAY_KEY_LONG |MAY_BE_ARRAY_KEY_STRING ))
3255+ && (opline -> opcode == ZEND_FETCH_DIM_RW
32553256 || opline -> opcode == ZEND_FETCH_DIM_W
32563257 || opline -> opcode == ZEND_FETCH_DIM_FUNC_ARG
3257- || opline -> opcode == ZEND_FETCH_LIST_W ) {
3258+ || opline -> opcode == ZEND_FETCH_LIST_W )) {
32583259 j = ssa_vars [ssa_op -> result_def ].use_chain ;
32593260 if (j < 0 ) {
32603261 /* no uses */
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Type inference 006: FETCH_DIM_W with invalid key type
3+ --INI--
4+ opcache.enable=1
5+ opcache.enable_cli=1
6+ opcache.optimization_level=-1
7+ --FILE--
8+ <?php
9+ function y () {
10+ $ obj =new y ;
11+ u ($ y [$ obj ]);
12+ }
13+ ?>
14+ DONE
15+ --EXPECT--
16+ DONE
You can’t perform that action at this time.
0 commit comments