From ef5ea48741a1d227a10a6654c1a8cc2f02dd414f Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 10 Oct 2017 10:11:05 +0300 Subject: Always use IS_CONSTANT_AST (IS_CONSTANT is removed). --- sapi/phpdbg/phpdbg_utils.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'sapi/phpdbg/phpdbg_utils.c') diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index bdcb173c24..fa27fa96a8 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -844,12 +844,17 @@ char *phpdbg_short_zval_print(zval *zv, int maxlen) /* {{{ */ ZSTR_VAL(str), ZSTR_LEN(str) <= maxlen ? 0 : '+'); break; } - case IS_CONSTANT: - decode = estrdup(""); - break; - case IS_CONSTANT_AST: - decode = estrdup(""); + case IS_CONSTANT_AST: { + zend_ast *ast = Z_ASTVAL_P(zv); + + if (ast->kind == ZEND_AST_CONSTANT + || ast->kind == ZEND_AST_CONSTANT_CLASS) { + decode = estrdup(""); + } else { + decode = estrdup(""); + } break; + } default: spprintf(&decode, 0, "unknown type: %d", Z_TYPE_P(zv)); break; -- cgit v1.2.1