@@ -1724,8 +1724,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
1724
1724
on_this = 0 ;
1725
1725
if (opline -> op1_type == IS_UNUSED ) {
1726
1726
op1_info = MAY_BE_OBJECT |MAY_BE_RC1 |MAY_BE_RCN ;
1727
- ce = op_array -> scope ;
1728
- ce_is_instanceof = (ce -> ce_flags & ZEND_ACC_FINAL ) != 0 ;
1727
+ /* scope is NULL for closures. */
1728
+ if (op_array -> scope ) {
1729
+ ce = op_array -> scope ;
1730
+ ce_is_instanceof = (ce -> ce_flags & ZEND_ACC_FINAL ) != 0 ;
1731
+ }
1729
1732
op1_addr = 0 ;
1730
1733
on_this = 1 ;
1731
1734
} else {
@@ -1772,8 +1775,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
1772
1775
on_this = 0 ;
1773
1776
if (opline -> op1_type == IS_UNUSED ) {
1774
1777
op1_info = MAY_BE_OBJECT |MAY_BE_RC1 |MAY_BE_RCN ;
1775
- ce = op_array -> scope ;
1776
- ce_is_instanceof = (ce -> ce_flags & ZEND_ACC_FINAL ) != 0 ;
1778
+ /* scope is NULL for closures. */
1779
+ if (op_array -> scope ) {
1780
+ ce = op_array -> scope ;
1781
+ ce_is_instanceof = (ce -> ce_flags & ZEND_ACC_FINAL ) != 0 ;
1782
+ }
1777
1783
op1_addr = 0 ;
1778
1784
on_this = 1 ;
1779
1785
} else {
@@ -1813,8 +1819,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
1813
1819
on_this = 0 ;
1814
1820
if (opline -> op1_type == IS_UNUSED ) {
1815
1821
op1_info = MAY_BE_OBJECT |MAY_BE_RC1 |MAY_BE_RCN ;
1816
- ce = op_array -> scope ;
1817
- ce_is_instanceof = (ce -> ce_flags & ZEND_ACC_FINAL ) != 0 ;
1822
+ /* scope is NULL for closures. */
1823
+ if (op_array -> scope ) {
1824
+ ce = op_array -> scope ;
1825
+ ce_is_instanceof = (ce -> ce_flags & ZEND_ACC_FINAL ) != 0 ;
1826
+ }
1818
1827
op1_addr = 0 ;
1819
1828
on_this = 1 ;
1820
1829
} else {
@@ -2283,8 +2292,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
2283
2292
if (opline -> op1_type == IS_UNUSED ) {
2284
2293
op1_info = MAY_BE_OBJECT |MAY_BE_RC1 |MAY_BE_RCN ;
2285
2294
op1_addr = 0 ;
2286
- ce = op_array -> scope ;
2287
- ce_is_instanceof = (ce -> ce_flags & ZEND_ACC_FINAL ) != 0 ;
2295
+ /* scope is NULL for closures. */
2296
+ if (op_array -> scope ) {
2297
+ ce = op_array -> scope ;
2298
+ ce_is_instanceof = (ce -> ce_flags & ZEND_ACC_FINAL ) != 0 ;
2299
+ }
2288
2300
on_this = 1 ;
2289
2301
} else {
2290
2302
op1_info = OP1_INFO ();
@@ -2434,8 +2446,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
2434
2446
if (opline -> op1_type == IS_UNUSED ) {
2435
2447
op1_info = MAY_BE_OBJECT |MAY_BE_RC1 |MAY_BE_RCN ;
2436
2448
op1_addr = 0 ;
2437
- ce = op_array -> scope ;
2438
- ce_is_instanceof = (ce -> ce_flags & ZEND_ACC_FINAL ) != 0 ;
2449
+ /* scope is NULL for closures. */
2450
+ if (op_array -> scope ) {
2451
+ ce = op_array -> scope ;
2452
+ ce_is_instanceof = (ce -> ce_flags & ZEND_ACC_FINAL ) != 0 ;
2453
+ }
2439
2454
on_this = 1 ;
2440
2455
} else {
2441
2456
op1_info = OP1_INFO ();
0 commit comments