summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index e3d16fd3e0..018f97e462 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -595,7 +595,8 @@ static void _parameter_string(smart_str *str, zend_function *fptr, struct _zend_
}
if (ZEND_TYPE_IS_SET(arg_info->type)) {
zend_string *type_str = zend_type_to_string(arg_info->type);
- smart_str_append_printf(str, "%s ", ZSTR_VAL(type_str));
+ smart_str_append(str, type_str);
+ smart_str_appendc(str, ' ');
zend_string_release(type_str);
}
if (ZEND_ARG_SEND_MODE(arg_info)) {
@@ -843,6 +844,12 @@ static void _property_string(smart_str *str, zend_property_info *prop, const cha
if (prop->flags & ZEND_ACC_STATIC) {
smart_str_appends(str, "static ");
}
+ if (ZEND_TYPE_IS_SET(prop->type)) {
+ zend_string *type_str = zend_type_to_string(prop->type);
+ smart_str_append(str, type_str);
+ smart_str_appendc(str, ' ');
+ zend_string_release(type_str);
+ }
if (!prop_name) {
const char *class_name;
zend_unmangle_property_name(prop->name, &class_name, &prop_name);