File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -2379,6 +2379,9 @@ static zval * ZEND_FASTCALL zend_jit_prepare_assign_dim_ref(zval *ref) {
2379
2379
if (Z_TYPE_P (val ) == IS_FALSE ) {
2380
2380
ZVAL_ARR (val , zend_new_array (8 ));
2381
2381
zend_false_to_array_deprecated ();
2382
+ if (EG (exception )) {
2383
+ return NULL ;
2384
+ }
2382
2385
} else {
2383
2386
ZVAL_ARR (val , zend_new_array (8 ));
2384
2387
}
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ JIT ASSIGN_DIM: 011
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
+ $ my_var = null <
11
+ set_error_handler (function ($ code , $ msg ) use (&$ my_var ) {
12
+ echo "Err: $ msg \n" ;
13
+ $ my_var [] = $ my_var = 0 ;
14
+ });
15
+ try {
16
+ $ my_var [] = "" ;
17
+ } catch (Throwable $ e ) {
18
+ echo "Exception: " . $ e ->getMessage () . "\n" ;
19
+ }
20
+ ?>
21
+ DONE
22
+ --EXPECT--
23
+ Err: Automatic conversion of false to array is deprecated
24
+ Exception: Cannot use a scalar value as an array
25
+ DONE
You can’t perform that action at this time.
0 commit comments