Skip to content

Commit bd2cd26

Browse files
committed
Create interned strings for internal union types
Just like for non-union types. These may be returned to userland via reflection, and as such need to be interned.
1 parent 9726bc6 commit bd2cd26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/zend_API.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,8 +2495,8 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
24952495
uint32_t j = 0;
24962496
while (true) {
24972497
const char *end = strchr(start, '|');
2498-
zend_string *str =
2499-
zend_string_init(start, end ? end - start : strlen(start), 1);
2498+
zend_string *str = zend_string_init_interned(
2499+
start, end ? end - start : strlen(start), 1);
25002500
list->types[j] = (zend_type) ZEND_TYPE_INIT_CLASS(str, 0, 0);
25012501
if (!end) {
25022502
break;

0 commit comments

Comments
 (0)