From 072eb6dd77b079a6f90ca5b155f9b0add1b5f2d4 Mon Sep 17 00:00:00 2001 From: Joe Watkins Date: Fri, 29 Mar 2019 08:01:31 +0100 Subject: tsrm environment lock --- main/php_variables.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'main/php_variables.c') diff --git a/main/php_variables.c b/main/php_variables.c index decf73a80f..f5692ede4b 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -548,6 +548,8 @@ void _php_import_environment_variables(zval *array_ptr) zval val; zend_ulong idx; + tsrm_env_lock(); + for (env = environ; env != NULL && *env != NULL; env++) { p = strchr(*env, '='); if (!p @@ -572,6 +574,8 @@ void _php_import_environment_variables(zval *array_ptr) php_register_variable_quick(*env, name_len, &val, Z_ARRVAL_P(array_ptr)); } } + + tsrm_env_unlock(); } zend_bool php_std_auto_global_callback(char *name, uint32_t name_len) -- cgit v1.2.1