Skip to content

Commit bc731f8

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fixed reference-countingin ZTS build.
2 parents 217888e + accf5ed commit bc731f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_inheritance.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,12 +1250,12 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_s
12501250
}
12511251
}
12521252

1253+
function_add_ref(fn);
12531254
if (UNEXPECTED(fn->type == ZEND_INTERNAL_FUNCTION)) {
12541255
new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_internal_function));
12551256
memcpy(new_fn, fn, sizeof(zend_internal_function));
12561257
new_fn->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED;
12571258
} else {
1258-
function_add_ref(fn);
12591259
new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_op_array));
12601260
memcpy(new_fn, fn, sizeof(zend_op_array));
12611261
}

0 commit comments

Comments
 (0)