summaryrefslogtreecommitdiff
path: root/Zend/zend_closures.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2015-02-02 19:53:32 +0000
committerJakub Zelenka <bukka@php.net>2015-02-02 19:53:32 +0000
commit3e4c1717ee4f4beb9c362942a113b90fff0a7fb0 (patch)
treef5da1649f6cfb5ae06b09b9cab4fd19a4446a767 /Zend/zend_closures.c
parentb65205028a2debc50c3e2ca1572da4c74ac87834 (diff)
parent92576c7c49a3c104bc4aea4cfa378a029bb26c86 (diff)
downloadphp-git-3e4c1717ee4f4beb9c362942a113b90fff0a7fb0.tar.gz
Merge branch 'master' into jsond
Diffstat (limited to 'Zend/zend_closures.c')
-rw-r--r--Zend/zend_closures.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index d50b42c0a2..3478ee6816 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -359,7 +359,9 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp) /* {{{
zend_hash_str_update(closure->debug_info, "this", sizeof("this")-1, &closure->this_ptr);
}
- if (arg_info) {
+ if (arg_info &&
+ (closure->func.common.num_args ||
+ (closure->func.common.fn_flags & ZEND_ACC_VARIADIC))) {
uint32_t i, num_args, required = closure->func.common.required_num_args;
array_init(&val);
@@ -481,6 +483,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
closure->func = *func;
closure->func.common.prototype = NULL;
+ closure->func.common.fn_flags |= ZEND_ACC_CLOSURE;
if ((scope == NULL) && this_ptr && (Z_TYPE_P(this_ptr) != IS_UNDEF)) {
/* use dummy scope if we're binding an object without specifying a scope */