From 1544562b49b17a365d96b3fb358645ef20774276 Mon Sep 17 00:00:00 2001 From: krakjoe Date: Thu, 14 Nov 2013 16:29:48 +0000 Subject: [PATCH] fix case sensitivity in print func command --- phpdbg_print.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/phpdbg_print.c b/phpdbg_print.c index e8a03332b8..952b71f9c7 100644 --- a/phpdbg_print.c +++ b/phpdbg_print.c @@ -171,7 +171,7 @@ PHPDBG_PRINT(func) /* {{{ */ zend_function* fbc; const char *func_name = expr; size_t func_name_len = expr_len; - + char *lcname; /* search active scope if begins with period */ if (func_name[0] == '.') { if (EG(scope)) { @@ -189,8 +189,10 @@ PHPDBG_PRINT(func) /* {{{ */ } else { func_table = EG(function_table); } - - if (zend_hash_find(func_table, func_name, func_name_len+1, (void**)&fbc) == SUCCESS) { + + lcname = zend_str_tolower_dup(func_name, func_name_len); + + if (zend_hash_find(func_table, lcname, strlen(lcname)+1, (void**)&fbc) == SUCCESS) { phpdbg_notice( "%s %s %s", (fbc->type == ZEND_USER_FUNCTION) ? "User" : "Internal", @@ -201,6 +203,8 @@ PHPDBG_PRINT(func) /* {{{ */ } else { phpdbg_error("Function %s not found", func_name); } + + efree(lcname); } else { phpdbg_error("No function name provided"); } -- 2.50.1