Skip to content

Commit

Permalink
php#17725 fix checking inheritance while replacing static with self i…
Browse files Browse the repository at this point in the history
…n final classes
  • Loading branch information
rekmixa committed Feb 10, 2025
1 parent 31c53e4 commit baa7b49
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Zend/zend_inheritance.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,12 @@ static inheritance_status zend_is_class_subtype_of_type(
}

if (!is_intersection && fe_scope->ce_flags & ZEND_ACC_FINAL && instanceof_function(fe_scope, proto_scope)) {
if (!fe_ce) fe_ce = lookup_class(fe_scope, fe_class_name);

if (!fe_ce || !instanceof_function(fe_ce, fe_scope)) {
return INHERITANCE_ERROR;
}

return INHERITANCE_SUCCESS;
}

Expand Down

0 comments on commit baa7b49

Please sign in to comment.