diff --git a/Zend/tests/gh20672.phpt b/Zend/tests/gh20672.phpt new file mode 100644 index 0000000000000..416cd3e5a6342 --- /dev/null +++ b/Zend/tests/gh20672.phpt @@ -0,0 +1,31 @@ +--TEST-- +GH-20672: Incorrect property_info sizing for locally shadowed trait properties +--CREDITS-- +Jonne Ransijn (yyny) +--FILE-- + +===DONE=== +--EXPECT-- +===DONE=== diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 557a99bc871d9..9b3b6312cf255 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -2925,9 +2925,7 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent ZSTR_VAL(prop_name), ZSTR_VAL(ce->name)); } - if (!(flags & ZEND_ACC_STATIC)) { - continue; - } + continue; } }