Skip to content

Commit a957dbf

Browse files
author
michael19
committed
#17725 remove redundand checking for is_intersection & move checking for static before checking for final
1 parent a77482d commit a957dbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/zend_inheritance.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,8 @@ static inheritance_status zend_is_class_subtype_of_type(
572572
}
573573

574574
/* Replacing static with self in final classes is okay */
575-
if (!is_intersection && (fe_scope->ce_flags & ZEND_ACC_FINAL) &&
576-
(ZEND_TYPE_FULL_MASK(proto_type) & MAY_BE_STATIC) && unlinked_instanceof(fe_scope, proto_scope)) {
575+
if ((ZEND_TYPE_FULL_MASK(proto_type) & MAY_BE_STATIC) &&
576+
(fe_scope->ce_flags & ZEND_ACC_FINAL) && unlinked_instanceof(fe_scope, proto_scope)) {
577577
if (!fe_ce) fe_ce = lookup_class(fe_scope, fe_class_name);
578578

579579
if (fe_ce == fe_scope) {

0 commit comments

Comments
 (0)