Skip to content

Commit 776f4bc

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Add missing refcount increment
2 parents ad53bac + 7816275 commit 776f4bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Zend/zend_closures.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ static int zend_create_closure_from_callable(zval *return_value, zval *callable,
284284
if (fcc.object && fcc.object->ce == zend_ce_closure
285285
&& zend_string_equals_literal(mptr->common.function_name, "__invoke")) {
286286
ZVAL_OBJ(return_value, fcc.object);
287+
GC_ADDREF(fcc.object);
287288
zend_free_trampoline(mptr);
288289
return SUCCESS;
289290
}

0 commit comments

Comments
 (0)