summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 5ac61a4fa0..f5692ede4b 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -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)
@@ -915,12 +919,3 @@ void php_startup_auto_globals(void)
zend_register_auto_global(zend_string_init_interned("_REQUEST", sizeof("_REQUEST")-1, 1), PG(auto_globals_jit), php_auto_globals_create_request);
zend_register_auto_global(zend_string_init_interned("_FILES", sizeof("_FILES")-1, 1), 0, php_auto_globals_create_files);
}
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */