summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-11-01 01:31:47 +0300
committerDmitry Stogov <dmitry@zend.com>2017-11-01 01:31:47 +0300
commitfcb13fab6e23bd95864b6767a7cf186699b68aca (patch)
tree0772509594ccb9f934c04fefccc602fc41d388f3
parentd481d495cc6abb00b4ef27df37cfce482c852a5a (diff)
downloadphp-git-fcb13fab6e23bd95864b6767a7cf186699b68aca.tar.gz
Avoid reference counting (the value may be a persistent string)
-rw-r--r--ext/reflection/php_reflection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index b55c986b9d..ffa5207ed4 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -543,6 +543,9 @@ static void _const_string(smart_str *str, char *name, zval *value, char *indent)
if (Z_TYPE_P(value) == IS_ARRAY) {
smart_str_append_printf(str, "%s Constant [ %s %s ] { Array }\n",
indent, type, name);
+ } else if (Z_TYPE_P(value) == IS_STRING) {
+ smart_str_append_printf(str, "%s Constant [ %s %s ] { %s }\n",
+ indent, type, name, Z_STRVAL_P(value));
} else {
zend_string *value_str = zval_get_string(value);
smart_str_append_printf(str, "%s Constant [ %s %s ] { %s }\n",