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 @@ -2682,8 +2682,8 @@ static zend_always_inline int _zend_update_type_info(
2682
2682
tmp |= MAY_BE_NULL |MAY_BE_FALSE |MAY_BE_TRUE |MAY_BE_LONG |MAY_BE_DOUBLE |MAY_BE_STRING ;
2683
2683
}
2684
2684
}
2685
- if (! tmp ) {
2686
- tmp = MAY_BE_NULL ;
2685
+ if (t1 & ( MAY_BE_TRUE | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_RESOURCE ) ) {
2686
+ tmp | = MAY_BE_NULL ;
2687
2687
}
2688
2688
tmp |= MAY_BE_RC1 | MAY_BE_RCN ;
2689
2689
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