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 @@ -2374,6 +2374,9 @@ static zval * ZEND_FASTCALL zend_jit_prepare_assign_dim_ref(zval *ref) {
23742374 if (Z_TYPE_P (val ) == IS_FALSE ) {
23752375 ZVAL_ARR (val , zend_new_array (8 ));
23762376 zend_false_to_array_deprecated ();
2377+ if (EG (exception )) {
2378+ return NULL ;
2379+ }
23772380 } else {
23782381 ZVAL_ARR (val , zend_new_array (8 ));
23792382 }
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