File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -2639,8 +2639,8 @@ static zend_always_inline int _zend_update_type_info(
26392639 tmp |= MAY_BE_NULL |MAY_BE_FALSE |MAY_BE_TRUE |MAY_BE_LONG |MAY_BE_DOUBLE |MAY_BE_STRING ;
26402640 }
26412641 }
2642- if (! tmp ) {
2643- tmp = MAY_BE_NULL ;
2642+ if (t1 & ( MAY_BE_TRUE | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_RESOURCE ) ) {
2643+ tmp | = MAY_BE_NULL ;
26442644 }
26452645 tmp |= MAY_BE_RC1 | MAY_BE_RCN ;
26462646 UPDATE_SSA_TYPE (tmp , ssa_op -> result_def );
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Type inference 008: ASSIGN_DIM with invalid op1
3+ --INI--
4+ opcache.enable=1
5+ opcache.enable_cli=1
6+ opcache.optimization_level=-1
7+ --FILE--
8+ <?php
9+ function y () {
10+ $ j = 0 ;
11+ for (;;) {
12+ $ cs = $ a + $ a ;
13+ $ a = [] ?? $ cs [] = $ j ;
14+ }
15+ }
16+ ?>
17+ DONE
18+ --EXPECT--
19+ DONE
You can’t perform that action at this time.
0 commit comments