Skip to content

Commit d39aa98

Browse files
committed
Refix #62358, previous has side-affect
1 parent 6d1bebf commit d39aa98

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Zend/zend_compile.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -3786,6 +3786,7 @@ static int zend_traits_merge_functions_to_class(zend_function *fn TSRMLS_DC, int
37863786
}
37873787

37883788
fn->common.scope = ce;
3789+
fn->common.prototype = prototype;
37893790

37903791
if (prototype
37913792
&& (prototype->common.fn_flags & ZEND_ACC_IMPLEMENTED_ABSTRACT
@@ -3803,11 +3804,11 @@ static int zend_traits_merge_functions_to_class(zend_function *fn TSRMLS_DC, int
38033804

38043805
/* one more thing: make sure we properly implement an abstract method */
38053806
if (existing_fn && existing_fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
3807+
prototype = fn->common.prototype;
38063808
do_inheritance_check_on_method(fn, existing_fn TSRMLS_CC);
3809+
fn->common.prototype = prototype;
38073810
}
38083811

3809-
fn->common.prototype = prototype;
3810-
38113812
/* delete inherited fn if the function to be added is not abstract */
38123813
if (existing_fn
38133814
&& existing_fn->common.scope != ce

0 commit comments

Comments
 (0)