Skip to content

Commit 39e62c2

Browse files
committed
don't zet _ZEND_TYPE_NAME_BIT for union types
1 parent b9cebe9 commit 39e62c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2961,7 +2961,6 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
29612961
// converting it to an union type if necessary.
29622962
const char *class_name = ZEND_TYPE_LITERAL_NAME(new_arg_info[i].type);
29632963
new_arg_info[i].type.type_mask &= ~_ZEND_TYPE_LITERAL_NAME_BIT;
2964-
new_arg_info[i].type.type_mask |= _ZEND_TYPE_NAME_BIT;
29652964

29662965
size_t num_types = 1;
29672966
const char *p = class_name;
@@ -2975,6 +2974,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
29752974
zend_string *str = zend_string_init_interned(class_name, strlen(class_name), 1);
29762975
zend_alloc_ce_cache(str);
29772976
ZEND_TYPE_SET_PTR(new_arg_info[i].type, str);
2977+
new_arg_info[i].type.type_mask |= _ZEND_TYPE_NAME_BIT;
29782978
} else {
29792979
/* Union type */
29802980
zend_type_list *list = malloc(ZEND_TYPE_LIST_SIZE(num_types));

0 commit comments

Comments
 (0)