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.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index d6b6d9718e..d5194d08ac 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -731,7 +731,6 @@ static void _function_string(smart_str *str, zend_function *fptr, zend_class_ent
smart_str param_indent = {0};
zend_function *overwrites;
zend_string *lc_name;
- size_t lc_name_len;
/* TBD: Repair indenting of doc comment (or is this to be done in the parser?)
* What's "wrong" is that any whitespace before the doc comment start is
@@ -755,15 +754,13 @@ static void _function_string(smart_str *str, zend_function *fptr, zend_class_ent
if (fptr->common.scope != scope) {
smart_str_append_printf(str, ", inherits %s", ZSTR_VAL(fptr->common.scope->name));
} else if (fptr->common.scope->parent) {
- lc_name_len = ZSTR_LEN(fptr->common.function_name);
- lc_name = zend_string_alloc(lc_name_len, 0);
- zend_str_tolower_copy(ZSTR_VAL(lc_name), ZSTR_VAL(fptr->common.function_name), lc_name_len);
+ lc_name = zend_string_tolower(fptr->common.function_name);
if ((overwrites = zend_hash_find_ptr(&fptr->common.scope->parent->function_table, lc_name)) != NULL) {
if (fptr->common.scope != overwrites->common.scope) {
smart_str_append_printf(str, ", overwrites %s", ZSTR_VAL(overwrites->common.scope->name));
}
}
- efree(lc_name);
+ zend_string_release(lc_name);
}
}
if (fptr->common.prototype && fptr->common.prototype->common.scope) {