Set UNION bit for internal class union return type

Fixes assertion failure reported in:
https://github.com/php/php-src/pull/7115#issuecomment-882580767
This commit is contained in:
Nikita Popov 2021-07-19 16:24:19 +02:00
parent a4db74364d
commit 084d49a262
2 changed files with 26 additions and 18 deletions

View file

@ -2806,6 +2806,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
zend_type_list *list = malloc(ZEND_TYPE_LIST_SIZE(num_types));
list->num_types = num_types;
ZEND_TYPE_SET_LIST(new_arg_info[i].type, list);
ZEND_TYPE_FULL_MASK(new_arg_info[i].type) |= _ZEND_TYPE_UNION_BIT;
const char *start = class_name;
uint32_t j = 0;