Skip to content

Commit e8e4852

Browse files
committed
Restore CE_CACHE clear on persist
We still need to do this in case early binding succeeds and caches the class. We could guard that by !in_compilation as well, but in this case the previous cache clearing should be reliable, so restore it.
1 parent 03e9bed commit e8e4852

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/opcache/zend_persist.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,9 @@ zend_class_entry *zend_persist_class_entry(zend_class_entry *orig_ce)
868868
ce->inheritance_cache = NULL;
869869

870870
if (!(ce->ce_flags & ZEND_ACC_CACHED)) {
871+
if (ZSTR_HAS_CE_CACHE(ce->name)) {
872+
ZSTR_SET_CE_CACHE(ce->name, NULL);
873+
}
871874
zend_accel_store_interned_string(ce->name);
872875
if (!(ce->ce_flags & ZEND_ACC_ANON_CLASS)
873876
&& !ZCG(current_persistent_script)->corrupted) {

0 commit comments

Comments
 (0)