File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ PHP NEWS
11
11
. Fixed bug GH-12791 (Possible dereference of NULL in MySQLnd debug code).
12
12
(nielsdos)
13
13
14
+ - Opcache:
15
+ . Fixed JIT bug (Function JIT emits "Uninitialized string offset" warning
16
+ at the same time as invalid offset Error). (Girgias)
17
+
14
18
- Standard
15
19
. Fixed GH-12745 (http_build_query() default null argument for $arg_separator
16
20
is implicitly coerced to string). (Girgias)
Original file line number Diff line number Diff line change @@ -1100,6 +1100,9 @@ static zend_string* ZEND_FASTCALL zend_jit_fetch_dim_str_r_helper(zend_string *s
1100
1100
} else {
1101
1101
offset = Z_LVAL_P (dim );
1102
1102
}
1103
+ if (UNEXPECTED (EG (exception ) != NULL )) {
1104
+ return ZSTR_EMPTY_ALLOC ();
1105
+ }
1103
1106
return zend_jit_fetch_dim_str_offset (str , offset );
1104
1107
}
1105
1108
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-12723: Function JIT emits "Uninitialized string offset" warning at the same time as invalid offset Error
3
+ --INI--
4
+ opcache.enable=1
5
+ opcache.enable_cli=1
6
+ --FILE--
7
+ <?php
8
+
9
+ $ container = '' ;
10
+ $ dimension = [];
11
+
12
+ try {
13
+ var_dump ($ container [$ dimension ]);
14
+ } catch (\Throwable $ e ) {
15
+ echo $ e ->getMessage (), "\n" ;
16
+ }
17
+
18
+ ?>
19
+ --EXPECT--
20
+ Cannot access offset of type array on string
You can’t perform that action at this time.
0 commit comments