@@ -3375,9 +3375,7 @@ ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_
33753375 }
33763376
33773377 uint32_t is_cacheable = ce -> ce_flags & ZEND_ACC_IMMUTABLE ;
3378- if (parent_ce ) {
3379- UPDATE_IS_CACHEABLE (parent_ce );
3380- }
3378+ UPDATE_IS_CACHEABLE (parent_ce );
33813379 if (is_cacheable ) {
33823380 if (zend_inheritance_cache_get && zend_inheritance_cache_add ) {
33833381 zend_class_entry * ret = zend_inheritance_cache_get (ce , parent_ce , NULL );
@@ -3394,14 +3392,10 @@ ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_
33943392 proto = ce ;
33953393 }
33963394
3397- if (parent_ce ) {
3398- orig_linking_class = CG (current_linking_class );
3399- CG (current_linking_class ) = NULL ;
3400- status = zend_can_early_bind (ce , parent_ce );
3401- CG (current_linking_class ) = orig_linking_class ;
3402- } else {
3403- status = INHERITANCE_SUCCESS ;
3404- }
3395+ orig_linking_class = CG (current_linking_class );
3396+ CG (current_linking_class ) = NULL ;
3397+ status = zend_can_early_bind (ce , parent_ce );
3398+ CG (current_linking_class ) = orig_linking_class ;
34053399 if (EXPECTED (status != INHERITANCE_UNRESOLVED )) {
34063400 if (ce -> ce_flags & ZEND_ACC_IMMUTABLE ) {
34073401 /* Lazy class loading */
@@ -3426,11 +3420,9 @@ ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_
34263420 zend_begin_record_errors ();
34273421 }
34283422
3429- if (parent_ce ) {
3430- zend_do_inheritance_ex (ce , parent_ce , status == INHERITANCE_SUCCESS );
3431- if (parent_ce -> num_interfaces ) {
3432- zend_do_inherit_interfaces (ce , parent_ce );
3433- }
3423+ zend_do_inheritance_ex (ce , parent_ce , status == INHERITANCE_SUCCESS );
3424+ if (parent_ce && parent_ce -> num_interfaces ) {
3425+ zend_do_inherit_interfaces (ce , parent_ce );
34343426 }
34353427 zend_build_properties_info_table (ce );
34363428 if ((ce -> ce_flags & (ZEND_ACC_IMPLICIT_ABSTRACT_CLASS |ZEND_ACC_INTERFACE |ZEND_ACC_TRAIT |ZEND_ACC_EXPLICIT_ABSTRACT_CLASS )) == ZEND_ACC_IMPLICIT_ABSTRACT_CLASS ) {
0 commit comments