mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
little fix
This commit is contained in:
parent
e7d20a0422
commit
9dae1475ef
@ -72,7 +72,7 @@ void php_rfc1867_register_constants(TSRMLS_D)
|
||||
|
||||
static void normalize_protected_variable(char *varname TSRMLS_DC)
|
||||
{
|
||||
char *s=varname, *index=NULL, *indexend=NULL;
|
||||
char *s=varname, *index=NULL, *indexend=NULL, *p;
|
||||
|
||||
/* overjump leading space */
|
||||
while (*s == ' ') {
|
||||
@ -84,6 +84,15 @@ static void normalize_protected_variable(char *varname TSRMLS_DC)
|
||||
memcpy(varname, s, strlen(s)+1);
|
||||
}
|
||||
|
||||
for (p=varname; *p && *p != '['; p++) {
|
||||
switch(*p) {
|
||||
case ' ':
|
||||
case '.':
|
||||
*p='_';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* find index */
|
||||
index = strchr(varname, '[');
|
||||
if (index) {
|
||||
|
Loading…
Reference in New Issue
Block a user