diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-07 10:20:31 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-07 10:20:31 +0200 |
commit | 7da8c48a9b9e11b51c94fd4e99ea24619bcf2958 (patch) | |
tree | b2388632f52938ef275f25d26615cb73053a2d45 /Zend/zend_closures.c | |
parent | 1e39469678ab94c174c2a2abc476717febc12438 (diff) | |
parent | d9b4974cbcb68881237ebeaeae4ed9b4db62436f (diff) | |
download | php-git-7da8c48a9b9e11b51c94fd4e99ea24619bcf2958.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #79778
Diffstat (limited to 'Zend/zend_closures.c')
-rw-r--r-- | Zend/zend_closures.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index a0d6450c5e..1d27502388 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -524,10 +524,17 @@ static HashTable *zend_closure_get_debug_info(zend_object *object, int *is_temp) debug_info = zend_new_array(8); if (closure->func.type == ZEND_USER_FUNCTION && closure->func.op_array.static_variables) { + zval *var; HashTable *static_variables = ZEND_MAP_PTR_GET(closure->func.op_array.static_variables_ptr); ZVAL_ARR(&val, zend_array_dup(static_variables)); zend_hash_update(debug_info, ZSTR_KNOWN(ZEND_STR_STATIC), &val); + ZEND_HASH_FOREACH_VAL(Z_ARRVAL(val), var) { + if (Z_TYPE_P(var) == IS_CONSTANT_AST) { + zval_ptr_dtor(var); + ZVAL_STRING(var, "<constant ast>"); + } + } ZEND_HASH_FOREACH_END(); } if (Z_TYPE(closure->this_ptr) != IS_UNDEF) { |