Fix incorrect inheritance cache update (#10719)

This commit is contained in:
Dmitry Stogov 2023-02-27 21:39:18 +03:00 committed by GitHub
parent f440911057
commit 2e3fc8c0ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();