Skip to content

Commit 36b7021

Browse files
committed
Private methods don't have to be duplicated
1 parent 788a689 commit 36b7021

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/zend_inheritance.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ static zend_function *zend_duplicate_function(zend_function *func, zend_class_en
7070
if (func->op_array.refcount) {
7171
(*func->op_array.refcount)++;
7272
}
73-
if (EXPECTED(!func->op_array.static_variables)) {
73+
if (EXPECTED(!func->op_array.static_variables)
74+
|| (func->op_array.fn_flags & ZEND_ACC_PRIVATE)) {
7475
/* reuse the same op_array structure */
7576
return func;
7677
}

0 commit comments

Comments
 (0)