diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index e5ef090f6e787..91104d2d42026 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2353,9 +2353,9 @@ static zend_class_entry* zend_accel_inheritance_cache_add(zend_class_entry *ce, SHM_UNPROTECT(); zend_shared_alloc_lock(); - entry = ce->inheritance_cache; + entry = proto->inheritance_cache; while (entry) { - entry = zend_accel_inheritance_cache_find(entry, ce, parent, traits_and_interfaces, &needs_autoload); + entry = zend_accel_inheritance_cache_find(entry, proto, parent, traits_and_interfaces, &needs_autoload); if (entry) { if (!needs_autoload) { zend_shared_alloc_unlock();