summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index fc4a39acb6..3438bcbf1e 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -815,9 +815,15 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
}
if (UNEXPECTED(func->op_array.fn_flags & ZEND_ACC_CLOSURE)) {
+ uint32_t call_info;
+
ZEND_ASSERT(GC_TYPE((zend_object*)func->op_array.prototype) == IS_OBJECT);
GC_REFCOUNT((zend_object*)func->op_array.prototype)++;
- ZEND_ADD_CALL_FLAG(call, ZEND_CALL_CLOSURE);
+ call_info = ZEND_CALL_CLOSURE;
+ if (func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE) {
+ call_info |= ZEND_CALL_FAKE_CLOSURE;
+ }
+ ZEND_ADD_CALL_FLAG(call, call_info);
}
if (func->type == ZEND_USER_FUNCTION) {