com php-src: fix case sensitivity in print method command: phpdbg_print.c
| From: | Bob Weinand | Date: | Thu, 14 Nov 2013 16:25:55 +0000 |
| Subject: | com php-src: fix case sensitivity in print method command: phpdbg_print.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74966@lists.php.net to get a copy of this message | ||
Commit: 6c6779d474ba8088ea4176c50e2c0f193223f209
Author: krakjoe <joe.watkins@live.co.uk> Thu, 14 Nov 2013 16:25:55 +0000
Parents: fb1ee0bbf6a349f4335aabd59008532231dc7cb5
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6c6779d474ba8088ea4176c50e2c0f193223f209
Log:
fix case sensitivity in print method command
Changed paths:
M phpdbg_print.c
Diff:
diff --git a/phpdbg_print.c b/phpdbg_print.c
index ca55255..e8a0333 100644
--- a/phpdbg_print.c
+++ b/phpdbg_print.c
@@ -135,8 +135,9 @@ PHPDBG_PRINT(method) /* {{{ */
if (zend_lookup_class(class_name, strlen(class_name), &ce TSRMLS_CC) == SUCCESS) {
zend_function *fbc;
-
- if (zend_hash_find(&(*ce)->function_table, func_name, strlen(func_name)+1,
(void**)&fbc) == SUCCESS) {
+ char *lcname = zend_str_tolower_dup(func_name, strlen(func_name));
+
+ if (zend_hash_find(&(*ce)->function_table, lcname, strlen(lcname)+1,
(void**)&fbc) == SUCCESS) {
phpdbg_notice(
"%s Method %s",
(fbc->type == ZEND_USER_FUNCTION) ? "User" :
"Internal",
@@ -146,6 +147,8 @@ PHPDBG_PRINT(method) /* {{{ */
} else {
phpdbg_error("The method %s could not be found", func_name);
}
+
+ efree(lcname);
} else {
phpdbg_error("Failed to find the requested class %s", class_name);
}