mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
- Change the argument order of php_register_variable() to something more
intuitive. - Make the authentication variables be a part of the HTTP_SERVER_VARS[] array
This commit is contained in:
parent
6864e05ae3
commit
b2449f929c
7 changed files with 25 additions and 19 deletions
|
@ -28,7 +28,7 @@
|
|||
#include "zend_globals.h"
|
||||
|
||||
|
||||
PHPAPI void php_register_variable(char *val, char *var, pval *track_vars_array ELS_DC PLS_DC)
|
||||
PHPAPI void php_register_variable(char *var, char *val, pval *track_vars_array ELS_DC PLS_DC)
|
||||
{
|
||||
char *p = NULL;
|
||||
char *ip; /* index pointer */
|
||||
|
@ -265,7 +265,7 @@ void php_treat_data(int arg, char *str ELS_DC PLS_DC SLS_DC)
|
|||
/* FIXME: XXX: not binary safe, discards returned length */
|
||||
php_url_decode(var, strlen(var));
|
||||
php_url_decode(val, strlen(val));
|
||||
php_register_variable(val, var, array_ptr ELS_CC PLS_CC);
|
||||
php_register_variable(var, val, array_ptr ELS_CC PLS_CC);
|
||||
}
|
||||
if (arg == PARSE_COOKIE) {
|
||||
var = strtok_r(NULL, ";", &strtok_buf);
|
||||
|
@ -303,7 +303,7 @@ void php_import_environment_variables(ELS_D PLS_DC)
|
|||
continue;
|
||||
}
|
||||
t = estrndup(*env, p - *env);
|
||||
php_register_variable(p+1, t, array_ptr ELS_CC PLS_CC);
|
||||
php_register_variable(t, p+1, array_ptr ELS_CC PLS_CC);
|
||||
efree(t);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue