File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -2708,6 +2708,9 @@ static zend_always_inline zend_result _zend_update_type_info(
2708
2708
tmp |= MAY_BE_NULL |MAY_BE_FALSE |MAY_BE_TRUE |MAY_BE_LONG |MAY_BE_DOUBLE |MAY_BE_STRING ;
2709
2709
}
2710
2710
}
2711
+ if (!tmp ) {
2712
+ tmp = MAY_BE_NULL ;
2713
+ }
2711
2714
tmp |= MAY_BE_RC1 | MAY_BE_RCN ;
2712
2715
UPDATE_SSA_TYPE (tmp , ssa_op -> result_def );
2713
2716
}
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Type inference 005: Use MAY_BE_NULL result (insted of empty) for ASSIGN_DIM with invalid arguments
3
+ --INI--
4
+ opcache.enable=1
5
+ opcache.enable_cli=1
6
+ opcache.optimization_level=-1
7
+ --FILE--
8
+ <?php
9
+ function foo () {
10
+ $ a = $ r [] = $ r = [] & $ y ;
11
+ +list (&$ y ) = $ a ;
12
+ }
13
+ ?>
14
+ DONE
15
+ --EXPECT--
16
+ DONE
You can’t perform that action at this time.
0 commit comments