File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 9
9
- Reflection:
10
10
. Fixed bug #81611 (ArgumentCountError when getting default value from
11
11
ReflectionParameter with new). (Cameron Porter)
12
+ . Fixed bug #81630 (PHP 8.1: ReflectionClass->getTraitAliases() crashes with
13
+ Internal error). (Nikita)
12
14
13
15
- XML:
14
16
. Fixed bug #79971 (special character is breaking the path in xml function).
Original file line number Diff line number Diff line change @@ -5116,18 +5116,15 @@ ZEND_METHOD(ReflectionClass, getTraitAliases)
5116
5116
5117
5117
if (!class_name ) {
5118
5118
uint32_t j = 0 ;
5119
- zval * zv ;
5120
- zend_class_entry * trait ;
5121
5119
zend_string * lcname = zend_string_tolower (cur_ref -> method_name );
5122
5120
5123
5121
for (j = 0 ; j < ce -> num_traits ; j ++ ) {
5124
- zv = zend_hash_find_known_hash (CG (class_table ), ce -> trait_names [j ].lc_name );
5125
- if (zv ) {
5126
- trait = Z_CE_P (zv );
5127
- if (zend_hash_exists (& trait -> function_table , lcname )) {
5128
- class_name = trait -> name ;
5129
- break ;
5130
- }
5122
+ zend_class_entry * trait =
5123
+ zend_hash_find_ptr (CG (class_table ), ce -> trait_names [j ].lc_name );
5124
+ ZEND_ASSERT (trait && "Trait must exist" );
5125
+ if (zend_hash_exists (& trait -> function_table , lcname )) {
5126
+ class_name = trait -> name ;
5127
+ break ;
5131
5128
}
5132
5129
}
5133
5130
zend_string_release_ex (lcname , 0 );
You can’t perform that action at this time.
0 commit comments