Skip to content

Commit 76b8bac

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Fix OpCache build after 0b0259a
2 parents c0789fe + cb3adf3 commit 76b8bac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Zend/zend_compile.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6523,23 +6523,25 @@ static zend_type zend_compile_typename(
65236523

65246524
ZEND_ASSERT(list->children == type_list->num_types);
65256525

6526-
ZEND_TYPE_FULL_MASK(type) |= _ZEND_TYPE_ARENA_BIT;
65276526
/* An implicitly nullable intersection type needs to be converted to a DNF type */
65286527
if (force_allow_null) {
65296528
zend_type intersection_type = ZEND_TYPE_INIT_NONE(0);
65306529
ZEND_TYPE_SET_LIST(intersection_type, type_list);
65316530
ZEND_TYPE_FULL_MASK(intersection_type) |= _ZEND_TYPE_INTERSECTION_BIT;
6531+
ZEND_TYPE_FULL_MASK(intersection_type) |= _ZEND_TYPE_ARENA_BIT;
65326532

6533-
zend_type_list *dnf_type_list = zend_arena_alloc(&CG(arena), ZEND_TYPE_LIST_SIZE(list->children));
6533+
zend_type_list *dnf_type_list = zend_arena_alloc(&CG(arena), ZEND_TYPE_LIST_SIZE(1));
65346534
dnf_type_list->num_types = 1;
65356535
dnf_type_list->types[0] = intersection_type;
65366536
ZEND_TYPE_SET_LIST(type, dnf_type_list);
65376537
/* Inform that the type list is a DNF type */
65386538
ZEND_TYPE_FULL_MASK(type) |= _ZEND_TYPE_UNION_BIT;
6539+
ZEND_TYPE_FULL_MASK(type) |= _ZEND_TYPE_ARENA_BIT;
65396540
} else {
65406541
ZEND_TYPE_SET_LIST(type, type_list);
65416542
/* Inform that the type list is an intersection type */
65426543
ZEND_TYPE_FULL_MASK(type) |= _ZEND_TYPE_INTERSECTION_BIT;
6544+
ZEND_TYPE_FULL_MASK(type) |= _ZEND_TYPE_ARENA_BIT;
65436545
}
65446546
} else {
65456547
type = zend_compile_single_typename(ast);

0 commit comments

Comments
 (0)