mirror of
https://github.com/php/php-src.git
synced 2025-01-22 11:44:09 +08:00
Fix preloading of trait property attributes
This commit is contained in:
parent
5a7e1a7aa8
commit
1bd6fafa2f
@ -24,6 +24,9 @@ class x extends c implements a, b {
|
||||
}
|
||||
|
||||
trait T1 {
|
||||
#[A]
|
||||
public $prop;
|
||||
|
||||
static function foo() {
|
||||
var_dump(__METHOD__);
|
||||
}
|
||||
|
@ -266,6 +266,12 @@ static HashTable *zend_persist_attributes(HashTable *attributes)
|
||||
return attributes;
|
||||
}
|
||||
|
||||
/* Attributes for trait properties may be shared if preloading is used. */
|
||||
HashTable *xlat = zend_shared_alloc_get_xlat_entry(attributes);
|
||||
if (xlat) {
|
||||
return xlat;
|
||||
}
|
||||
|
||||
zend_hash_persist(attributes);
|
||||
|
||||
ZEND_HASH_FOREACH_VAL(attributes, v) {
|
||||
|
Loading…
Reference in New Issue
Block a user