@@ -2220,14 +2220,6 @@ static void zend_do_implement_interfaces(zend_class_entry *ce, zend_class_entry
22202220 }
22212221 }
22222222
2223- if (!(ce -> ce_flags & ZEND_ACC_CACHED )) {
2224- for (i = 0 ; i < ce -> num_interfaces ; i ++ ) {
2225- zend_string_release_ex (ce -> interface_names [i ].name , 0 );
2226- zend_string_release_ex (ce -> interface_names [i ].lc_name , 0 );
2227- }
2228- efree (ce -> interface_names );
2229- }
2230-
22312223 ce -> num_interfaces = num_interfaces ;
22322224 ce -> interfaces = interfaces ;
22332225 ce -> ce_flags |= ZEND_ACC_RESOLVED_INTERFACES ;
@@ -3583,6 +3575,14 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string
35833575 Z_CE_P (zv ) = ce ;
35843576 }
35853577
3578+ if (!(ce -> ce_flags & ZEND_ACC_CACHED )) {
3579+ for (i = 0 ; i < ce -> num_interfaces ; i ++ ) {
3580+ zend_string_release_ex (ce -> interface_names [i ].name , 0 );
3581+ zend_string_release_ex (ce -> interface_names [i ].lc_name , 0 );
3582+ }
3583+ efree (ce -> interface_names );
3584+ }
3585+
35863586 ce -> num_interfaces = num_implementable_interfaces ;
35873587
35883588 if (CG (unlinked_uses )) {
@@ -3628,6 +3628,7 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string
36283628 } else if (parent && parent -> num_interfaces ) {
36293629 zend_do_inherit_interfaces (ce , parent );
36303630 }
3631+
36313632 if (!(ce -> ce_flags & (ZEND_ACC_INTERFACE |ZEND_ACC_TRAIT ))
36323633 && (ce -> ce_flags & (ZEND_ACC_IMPLICIT_ABSTRACT_CLASS |ZEND_ACC_EXPLICIT_ABSTRACT_CLASS ))
36333634 ) {
0 commit comments