We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6dbd08 commit fbd6799Copy full SHA for fbd6799
ext/opcache/ZendAccelerator.c
@@ -549,7 +549,7 @@ zend_string* ZEND_FASTCALL accel_new_interned_string(zend_string *str)
549
STRTAB_COLLISION(s) = *hash_slot;
550
*hash_slot = STRTAB_STR_TO_POS(&ZCSG(interned_strings), s);
551
GC_SET_REFCOUNT(s, 2);
552
- GC_TYPE_INFO(s) = GC_STRING | ((IS_STR_INTERNED | IS_STR_PERMANENT) << GC_FLAGS_SHIFT);
+ GC_TYPE_INFO(s) = GC_STRING | ((IS_STR_INTERNED | IS_STR_PERMANENT) << GC_FLAGS_SHIFT)| (ZSTR_IS_VALID_UTF8(str) ? IS_STR_VALID_UTF8 : 0);
553
ZSTR_H(s) = h;
554
ZSTR_LEN(s) = ZSTR_LEN(str);
555
memcpy(ZSTR_VAL(s), ZSTR_VAL(str), ZSTR_LEN(s) + 1);
0 commit comments