From: Dmitry Stogov Date: Wed, 10 Feb 2021 14:59:11 +0000 (+0300) Subject: Fixed map_ptr slot sharing for trait/self X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8f6d44c1c36e95c0b053555b2c616fe396ab810;p=php Fixed map_ptr slot sharing for trait/self --- 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;