Skip to content

Commit d005a8e

Browse files
committed
Fixed bug #79743 (Fatal error when assigning to array property with JIT enabled)
simple typo
1 parent 053ef28 commit d005a8e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ PHP NEWS
7272
. Removed deprecated INTL_IDNA_VARIANT_2003. (cmb)
7373

7474
- JIT:
75+
. Fixed bug #79743 (Fatal error when assigning to array property
76+
with JIT enabled). (Laruence)
7577
. Fixed bug #79582 (Crash seen when opcache.jit=1235 and
7678
opcache.jit_debug=2). (Laruence)
7779
. Fixed bug #77857 (Wrong result if executed with JIT). (Laruence)

ext/opcache/jit/zend_jit_helpers.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,10 +1536,10 @@ static void ZEND_FASTCALL zend_jit_check_array_promotion(zval *val, zend_propert
15361536
const zend_op *opline = execute_data->opline;
15371537
zval *result = EX_VAR(opline->result.var);
15381538

1539-
if (((Z_TYPE_P(val) <= IS_FALSE
1540-
|| (Z_ISREF_P(val) && Z_TYPE_P(Z_REFVAL_P(val)) <= IS_FALSE))
1541-
&& ZEND_TYPE_IS_SET(prop->type)
1542-
&& ZEND_TYPE_FULL_MASK(prop->type) & (MAY_BE_ITERABLE|MAY_BE_ARRAY)) == 0) {
1539+
if ((Z_TYPE_P(val) <= IS_FALSE
1540+
|| (Z_ISREF_P(val) && Z_TYPE_P(Z_REFVAL_P(val)) <= IS_FALSE))
1541+
&& ZEND_TYPE_IS_SET(prop->type)
1542+
&& (ZEND_TYPE_FULL_MASK(prop->type) & (MAY_BE_ITERABLE|MAY_BE_ARRAY)) == 0) {
15431543
zend_string *type_str = zend_type_to_string(prop->type);
15441544
zend_type_error(
15451545
"Cannot auto-initialize an array inside property %s::$%s of type %s",

0 commit comments

Comments
 (0)