mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Removed unnecessary copying
This commit is contained in:
parent
ead7652457
commit
8c40d605e4
@ -433,7 +433,7 @@ void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC)
|
||||
{
|
||||
if (!FCGX_IsCGI()) {
|
||||
FCGX_Request *request = (FCGX_Request *) SG(server_context);
|
||||
char **env, *p, *t;
|
||||
char **env, *p;
|
||||
int magic_quotes_gpc = PG(magic_quotes_gpc);
|
||||
|
||||
/* turn off magic_quotes while importing environment variables */
|
||||
@ -443,9 +443,9 @@ void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC)
|
||||
if (!p) { /* malformed entry? */
|
||||
continue;
|
||||
}
|
||||
t = estrndup(*env, p - *env);
|
||||
php_register_variable(t, p + 1, array_ptr TSRMLS_CC);
|
||||
efree(t);
|
||||
*p = 0;
|
||||
php_register_variable(*env, p + 1, array_ptr TSRMLS_CC);
|
||||
*p = '=';
|
||||
}
|
||||
PG(magic_quotes_gpc) = magic_quotes_gpc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user