diff options
author | Stefan Esser <sesser@php.net> | 2002-11-22 19:34:17 +0000 |
---|---|---|
committer | Stefan Esser <sesser@php.net> | 2002-11-22 19:34:17 +0000 |
commit | 9dae1475ef3b4d1efcd85a9330570f13b94f17a6 (patch) | |
tree | d93a26834d3bd26fd4d5bd62b5be4189f6efc53d | |
parent | e7d20a0422ab62247834c5c97be022600225d259 (diff) | |
download | php-git-9dae1475ef3b4d1efcd85a9330570f13b94f17a6.tar.gz |
little fix
-rw-r--r-- | main/rfc1867.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/main/rfc1867.c b/main/rfc1867.c index f422b7e66c..38c8f1dd0b 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -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) { |