From: Stefan Esser Date: Fri, 22 Nov 2002 19:34:17 +0000 (+0000) Subject: little fix X-Git-Tag: RELEASE_1_0b2~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9dae1475ef3b4d1efcd85a9330570f13b94f17a6;p=php little fix --- 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) {