From e5cfb1d05cf10fa694f231dae33ccb03ab8f74c8 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Sat, 10 Jul 2004 07:46:17 +0000 Subject: - Better stability during premature shutdown of request startup --- main/php_variables.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'main/php_variables.c') 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); -- cgit v1.2.1