File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -2690,7 +2690,7 @@ static zend_always_inline zend_result _zend_update_type_info(
2690
2690
if (ssa_op -> result_def >= 0 ) {
2691
2691
tmp = 0 ;
2692
2692
if (t1 & MAY_BE_STRING ) {
2693
- tmp |= MAY_BE_STRING ;
2693
+ tmp |= MAY_BE_STRING | MAY_BE_NULL ;
2694
2694
}
2695
2695
if (t1 & (MAY_BE_ARRAY |MAY_BE_FALSE |MAY_BE_NULL |MAY_BE_UNDEF )) {
2696
2696
tmp |= (OP1_DATA_INFO () & (MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF ));
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ JIT ASSIGN_DIM: 006
3
+ --INI--
4
+ opcache.enable=1
5
+ opcache.enable_cli=1
6
+ opcache.file_update_protection=0
7
+ opcache.jit_buffer_size=1M
8
+ --FILE--
9
+ <?php
10
+ function foo ($ s ) {
11
+ $ s = "123 " ;
12
+ for ($ i = 0 ; $ i < 5 ; $ i ++) {
13
+ $ x = $ s [-5 ] = "x " ;
14
+ }
15
+ var_dump ($ x );
16
+ }
17
+ foo ("123 " );
18
+ ?>
19
+ --EXPECTF--
20
+ Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
21
+
22
+ Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
23
+
24
+ Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
25
+
26
+ Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
27
+
28
+ Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
29
+ NULL
You can’t perform that action at this time.
0 commit comments