From a8f6d44c1c36e95c0b053555b2c616fe396ab810 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 10 Feb 2021 17:59:11 +0300 Subject: [PATCH] Fixed map_ptr slot sharing for trait/self --- ext/opcache/zend_persist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index f1a7ee2ef5..139bac438b 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -296,7 +296,7 @@ uint32_t zend_accel_get_type_map_ptr(zend_string *type_name, zend_class_entry *s uint32_t ret; if (zend_string_equals_literal_ci(type_name, "self")) { - if (!scope) { + if (!scope || (scope->ce_flags & ZEND_ACC_TRAIT)) { return 0; } type_name = scope->name; -- 2.50.1