Skip to content

Commit a8f6d44

Browse files
committed
Fixed map_ptr slot sharing for trait/self
1 parent 1cd33d8 commit a8f6d44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/zend_persist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ uint32_t zend_accel_get_type_map_ptr(zend_string *type_name, zend_class_entry *s
296296
uint32_t ret;
297297

298298
if (zend_string_equals_literal_ci(type_name, "self")) {
299-
if (!scope) {
299+
if (!scope || (scope->ce_flags & ZEND_ACC_TRAIT)) {
300300
return 0;
301301
}
302302
type_name = scope->name;

0 commit comments

Comments
 (0)