summaryrefslogtreecommitdiff
path: root/Zend/zend_closures.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-07-07 10:20:11 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-07-07 10:20:11 +0200
commitd9b4974cbcb68881237ebeaeae4ed9b4db62436f (patch)
tree8ad1127d79791f170dfd785cf5ffcd37d15f4ac6 /Zend/zend_closures.c
parent971e5c5186a2a2339b0dbad4f2a057a9deed5aa2 (diff)
parentb765f96f5f6d7d5da77e1d57f80b98f1fde16cde (diff)
downloadphp-git-d9b4974cbcb68881237ebeaeae4ed9b4db62436f.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fixed bug #79778
Diffstat (limited to 'Zend/zend_closures.c')
-rw-r--r--Zend/zend_closures.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index 92f1398d84..70dc469a48 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -531,10 +531,17 @@ static HashTable *zend_closure_get_debug_info(zval *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) {