Fix the arg_separator behaviour. Only & or ; is allowed as separators so no need to use the ini setting here.

This commit is contained in:
foobar 2001-03-27 11:34:51 +00:00
parent e080bd20e8
commit 8c97f5c04d

View file

@ -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;