]> granicus.if.org Git - php/commitdiff
Avoid reference counting (the value may be a persistent string)
authorDmitry Stogov <dmitry@zend.com>
Tue, 31 Oct 2017 22:31:47 +0000 (01:31 +0300)
committerDmitry Stogov <dmitry@zend.com>
Tue, 31 Oct 2017 22:31:47 +0000 (01:31 +0300)
ext/reflection/php_reflection.c

index b55c986b9da09bb19cae3ed3aa87c01244d6e9c4..ffa5207ed426c72ae72b9156f36028a4bce15c17 100644 (file)
@@ -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",