diff options
author | foobar <sniper@php.net> | 2001-03-27 11:34:51 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2001-03-27 11:34:51 +0000 |
commit | 8c97f5c04d4eda6187151665f56412f40ff81c8c (patch) | |
tree | 25af44fd515b59617f6b77dd6d467f0de6400b42 /main/php_variables.c | |
parent | e080bd20e8951a2898f3f2d9da06799a413016fb (diff) | |
download | php-git-8c97f5c04d4eda6187151665f56412f40ff81c8c.tar.gz |
Fix the arg_separator behaviour. Only & or ; is allowed as separators so no need to use the ini setting here.
Diffstat (limited to 'main/php_variables.c')
-rw-r--r-- | main/php_variables.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/main/php_variables.c b/main/php_variables.c index 10a77112a5..298e56ec40 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -277,13 +277,7 @@ void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC) return; } - if (arg == PARSE_COOKIE) { - var = php_strtok_r(res, ";", &strtok_buf); - } else if (arg == PARSE_POST) { - var = php_strtok_r(res, "&", &strtok_buf); - } else { - var = php_strtok_r(res, PG(arg_separator), &strtok_buf); - } + var = php_strtok_r(res, ";&", &strtok_buf); while (var) { val = strchr(var, '='); @@ -295,11 +289,7 @@ void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC) val_len = php_url_decode(val, strlen(val)); php_register_variable_safe(var, val, val_len, array_ptr ELS_CC PLS_CC); } - if (arg == PARSE_COOKIE) { - var = php_strtok_r(NULL, ";", &strtok_buf); - } else { - var = php_strtok_r(NULL, PG(arg_separator), &strtok_buf); - } + var = php_strtok_r(NULL, ";&", &strtok_buf); } if (free_buffer) { efree(res); @@ -307,7 +297,6 @@ void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC) } - void php_import_environment_variables(zval *array_ptr ELS_DC PLS_DC) { char **env, *p, *t; |