Skip to content

Commit 0fc3818

Browse files
committed
Initialize fast class cache
1 parent 0c7cdbb commit 0fc3818

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/opcache/zend_accelerator_util_funcs.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,13 @@ static void zend_accel_class_hash_copy(HashTable *target, HashTable *source)
200200
continue;
201201
}
202202
} else {
203+
zend_class_entry *ce = Z_PTR(p->val);
203204
t = _zend_hash_append_ptr_ex(target, p->key, Z_PTR(p->val), 1);
205+
if ((ce->ce_flags & ZEND_ACC_LINKED)
206+
&& ZSTR_HAS_CE_CACHE(ce->name)
207+
&& ZSTR_VAL(p->key)[0]) {
208+
ZSTR_SET_CE_CACHE(ce->name, ce);
209+
}
204210
}
205211
}
206212
target->nInternalPointer = 0;

0 commit comments

Comments
 (0)