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 @@ -29,6 +29,10 @@ PHP NEWS
29
29
. Fixed bug GH-12791 (Possible dereference of NULL in MySQLnd debug code).
30
30
(nielsdos)
31
31
32
+ - Opcache:
33
+ . Fixed JIT bug (Function JIT emits "Uninitialized string offset" warning
34
+ at the same time as invalid offset Error). (Girgias)
35
+
32
36
- OpenSSL:
33
37
. Fixed bug #50713 (openssl_pkcs7_verify() may ignore untrusted CAs).
34
38
(Jakub Zelenka)
Original file line number Diff line number Diff line change @@ -1106,6 +1106,9 @@ static zend_string* ZEND_FASTCALL zend_jit_fetch_dim_str_r_helper(zend_string *s
1106
1106
} else {
1107
1107
offset = Z_LVAL_P (dim );
1108
1108
}
1109
+ if (UNEXPECTED (EG (exception ) != NULL )) {
1110
+ return ZSTR_EMPTY_ALLOC ();
1111
+ }
1109
1112
return zend_jit_fetch_dim_str_offset (str , offset );
1110
1113
}
1111
1114
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