File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -571,14 +571,15 @@ static inheritance_status zend_is_class_subtype_of_type(
571571 return INHERITANCE_UNRESOLVED ;
572572 }
573573
574+ // replacing static with self in final classes is okay
574575 if (!is_intersection && fe_scope -> ce_flags & ZEND_ACC_FINAL && instanceof_function (fe_scope , proto_scope )) {
575576 if (!fe_ce ) fe_ce = lookup_class (fe_scope , fe_class_name );
576577
577- if (! fe_ce || ! instanceof_function (fe_ce , fe_scope )) {
578- return INHERITANCE_ERROR ;
578+ if (fe_ce && instanceof_function (fe_ce , fe_scope )) {
579+ return INHERITANCE_SUCCESS ;
579580 }
580581
581- return INHERITANCE_SUCCESS ;
582+ return INHERITANCE_ERROR ;
582583 }
583584
584585 return is_intersection ? INHERITANCE_SUCCESS : INHERITANCE_ERROR ;
You can’t perform that action at this time.
0 commit comments