Skip to content

Commit f518213

Browse files
committed
Skip ce cache copying code if already present
1 parent 4d5462a commit f518213

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: ext/opcache/ZendAccelerator.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ zend_string* ZEND_FASTCALL accel_new_interned_string(zend_string *str)
513513
finish:
514514
/* Transfer CE_CACHE map ptr slot to new interned string.
515515
* Should only happen for permanent interned strings with permanent map_ptr slot. */
516-
if (ZSTR_HAS_CE_CACHE(str)) {
516+
if (ZSTR_HAS_CE_CACHE(str) && !ZSTR_HAS_CE_CACHE(s)) {
517517
ZEND_ASSERT(GC_FLAGS(str) & IS_STR_PERMANENT);
518518
GC_SET_REFCOUNT(s, GC_REFCOUNT(str));
519519
GC_ADD_FLAGS(s, IS_STR_CLASS_NAME_MAP_PTR);

0 commit comments

Comments
 (0)