com php-src: fix case insensitivity for registered functions: phpdbg_prompt.c

From: Date: Tue, 07 Oct 2014 10:30:26 +0000
Subject: com php-src: fix case insensitivity for registered functions: phpdbg_prompt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82581@lists.php.net to get a copy of this message
Commit: f545ef48eba6c3c9e8b849a15deefdda76920807 Author: krakjoe <joe.watkins@live.co.uk> Tue, 7 Oct 2014 11:30:26 +0100 Parents: 556ed2d3f46b277ad38261ffcc4eb2faa5d14282 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f545ef48eba6c3c9e8b849a15deefdda76920807 Log: fix case insensitivity for registered functions Changed paths: M phpdbg_prompt.c Diff: diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 2196c21..ef2ba6f 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -91,19 +91,23 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack TSRMLS_DC) /* {{{ * phpdbg_param_t *name = NULL; if (stack->type == STACK_PARAM) { + char *lc_name; + name = stack->next; if (!name || name->type != STR_PARAM) { return FAILURE; } + lc_name = zend_str_tolower_dup(name->str, name->len); + if (zend_hash_exists( - &PHPDBG_G(registered), name->str, name->len+1)) { + &PHPDBG_G(registered), lc_name, name->len+1)) { zval fname, *fretval; zend_fcall_info fci; - ZVAL_STRINGL(&fname, name->str, name->len, 1); + ZVAL_STRINGL(&fname, lc_name, name->len, 1); memset(&fci, 0, sizeof(zend_fcall_info)); @@ -195,9 +199,12 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack TSRMLS_DC) /* {{{ * } zval_dtor(&fname); + efree(lc_name); return SUCCESS; } + + efree(lc_name); } return FAILURE;

« previous php.cvs (#82581) next »