com php-src: fix case sensitivity in print func command: phpdbg_print.c
| From: | Bob Weinand | Date: | Thu, 14 Nov 2013 16:29:48 +0000 |
| Subject: | com php-src: fix case sensitivity in print func command: phpdbg_print.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74967@lists.php.net to get a copy of this message | ||
Commit: 1544562b49b17a365d96b3fb358645ef20774276
Author: krakjoe <joe.watkins@live.co.uk> Thu, 14 Nov 2013 16:29:48 +0000
Parents: 6c6779d474ba8088ea4176c50e2c0f193223f209
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1544562b49b17a365d96b3fb358645ef20774276
Log:
fix case sensitivity in print func command
Changed paths:
M phpdbg_print.c
Diff:
diff --git a/phpdbg_print.c b/phpdbg_print.c
index e8a0333..952b71f 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");
}