summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_print.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_print.c')
-rw-r--r--sapi/phpdbg/phpdbg_print.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sapi/phpdbg/phpdbg_print.c b/sapi/phpdbg/phpdbg_print.c
index 7cc84b72dc..df925b6402 100644
--- a/sapi/phpdbg/phpdbg_print.c
+++ b/sapi/phpdbg/phpdbg_print.c
@@ -375,7 +375,7 @@ void phpdbg_print_opcodes_class(const char *class) {
phpdbg_print_opcodes_ce(ce);
}
-PHPDBG_API void phpdbg_print_opcodes(char *function)
+PHPDBG_API void phpdbg_print_opcodes(const char *function)
{
if (function == NULL) {
phpdbg_print_opcodes_main();
@@ -401,12 +401,12 @@ PHPDBG_API void phpdbg_print_opcodes(char *function)
}
} ZEND_HASH_FOREACH_END();
} else {
- function = zend_str_tolower_dup(function, strlen(function));
+ char *function_lowercase = zend_str_tolower_dup(function, strlen(function));
- if (strstr(function, "::") == NULL) {
- phpdbg_print_opcodes_function(function, strlen(function));
+ if (strstr(function_lowercase, "::") == NULL) {
+ phpdbg_print_opcodes_function(function_lowercase, strlen(function_lowercase));
} else {
- char *method_name, *class_name = strtok(function, "::");
+ char *method_name, *class_name = strtok(function_lowercase, "::");
if ((method_name = strtok(NULL, "::")) == NULL) {
phpdbg_print_opcodes_class(class_name);
} else {
@@ -414,6 +414,6 @@ PHPDBG_API void phpdbg_print_opcodes(char *function)
}
}
- efree(function);
+ efree(function_lowercase);
}
}