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(
2639
2639
tmp |= MAY_BE_NULL |MAY_BE_FALSE |MAY_BE_TRUE |MAY_BE_LONG |MAY_BE_DOUBLE |MAY_BE_STRING ;
2640
2640
}
2641
2641
}
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 ;
2644
2644
}
2645
2645
tmp |= MAY_BE_RC1 | MAY_BE_RCN ;
2646
2646
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