diff options
author | Andi Gutmans <andi@php.net> | 2004-07-10 07:46:17 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2004-07-10 07:46:17 +0000 |
commit | e5cfb1d05cf10fa694f231dae33ccb03ab8f74c8 (patch) | |
tree | 65252174d1cad948046778306ce3ba09d3d78682 /main/php_variables.c | |
parent | 41b639fffebd099699cdf9c3231539d72602ce38 (diff) | |
download | php-git-e5cfb1d05cf10fa694f231dae33ccb03ab8f74c8.tar.gz |
- Better stability during premature shutdown of request startup
Diffstat (limited to 'main/php_variables.c')
-rw-r--r-- | main/php_variables.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/main/php_variables.c b/main/php_variables.c index 556a323219..8058fd634d 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -694,9 +694,12 @@ static zend_bool php_auto_globals_create_server(char *name, uint name_len TSRMLS static zend_bool php_auto_globals_create_env(char *name, uint name_len TSRMLS_DC) { - ALLOC_ZVAL(PG(http_globals)[TRACK_VARS_ENV]); - array_init(PG(http_globals)[TRACK_VARS_ENV]); - INIT_PZVAL(PG(http_globals)[TRACK_VARS_ENV]); + zval *env_vars=NULL; + ALLOC_ZVAL(env_vars); + array_init(env_vars); + INIT_PZVAL(env_vars); + PG(http_globals)[TRACK_VARS_ENV] = env_vars; + php_import_environment_variables(PG(http_globals)[TRACK_VARS_ENV] TSRMLS_CC); zend_hash_update(&EG(symbol_table), name, name_len+1, &PG(http_globals)[TRACK_VARS_ENV], sizeof(zval *), NULL); |