@@ -2570,10 +2570,8 @@ static void check_unrecoverable_load_failure(zend_class_entry *ce) {
2570
2570
* to remove the class from the class table and throw an exception, because there is already
2571
2571
* a dependence on the inheritance hierarchy of this specific class. Instead we fall back to
2572
2572
* a fatal error, as would happen if we did not allow exceptions in the first place. */
2573
- if ((ce -> ce_flags & ZEND_ACC_HAS_UNLINKED_USES )
2574
- || ((ce -> ce_flags & ZEND_ACC_IMMUTABLE )
2575
- && CG (unlinked_uses )
2576
- && zend_hash_index_del (CG (unlinked_uses ), (zend_long )(zend_uintptr_t )ce ) == SUCCESS )) {
2573
+ if (CG (unlinked_uses )
2574
+ && zend_hash_index_del (CG (unlinked_uses ), (zend_long )(zend_uintptr_t )ce ) == SUCCESS ) {
2577
2575
zend_exception_uncaught_error (
2578
2576
"During inheritance of %s with variance dependencies" , ZSTR_VAL (ce -> name ));
2579
2577
}
@@ -2847,20 +2845,16 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string
2847
2845
ce = zend_lazy_class_load (ce );
2848
2846
zv = zend_hash_find_known_hash (CG (class_table ), key );
2849
2847
Z_CE_P (zv ) = ce ;
2850
- if (CG (unlinked_uses )
2851
- && zend_hash_index_del (CG (unlinked_uses ), (zend_long )(zend_uintptr_t )proto ) == SUCCESS ) {
2852
- ce -> ce_flags |= ZEND_ACC_HAS_UNLINKED_USES ;
2853
- }
2854
2848
} else if (ce -> ce_flags & ZEND_ACC_FILE_CACHED ) {
2855
2849
/* Lazy class loading */
2856
2850
ce = zend_lazy_class_load (ce );
2857
2851
ce -> ce_flags &= ~ZEND_ACC_FILE_CACHED ;
2858
2852
zv = zend_hash_find_known_hash (CG (class_table ), key );
2859
2853
Z_CE_P (zv ) = ce ;
2860
- if ( CG ( unlinked_uses )
2861
- && zend_hash_index_del ( CG ( unlinked_uses ), ( zend_long )( zend_uintptr_t ) proto ) == SUCCESS ) {
2862
- ce -> ce_flags |= ZEND_ACC_HAS_UNLINKED_USES ;
2863
- }
2854
+ }
2855
+
2856
+ if ( CG ( unlinked_uses )) {
2857
+ zend_hash_index_del ( CG ( unlinked_uses ), ( zend_long )( zend_uintptr_t ) ce );
2864
2858
}
2865
2859
2866
2860
orig_linking_class = CG (current_linking_class );
0 commit comments