Skip to content

Commit accf5ed

Browse files
committed
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Fixed reference-countingin ZTS build.
2 parents cd0a379 + 7fde224 commit accf5ed

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
@@ -1209,12 +1209,12 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_s
12091209
}
12101210
}
12111211

1212+
function_add_ref(fn);
12121213
if (UNEXPECTED(fn->type == ZEND_INTERNAL_FUNCTION)) {
12131214
new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_internal_function));
12141215
memcpy(new_fn, fn, sizeof(zend_internal_function));
12151216
new_fn->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED;
12161217
} else {
1217-
function_add_ref(fn);
12181218
new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_op_array));
12191219
memcpy(new_fn, fn, sizeof(zend_op_array));
12201220
}

0 commit comments

Comments
 (0)