summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-09-01 19:15:51 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-09-01 19:15:51 +0000
commitb56f2fe12d542dc0a6be528fd7239ac7a483e668 (patch)
tree240b349706ede8b6a7338dac9fb7fdb8329f60c1 /main/php_variables.c
parent54ee2cf3e46f38375db03eff606f36419f3454e3 (diff)
downloadphp-git-b56f2fe12d542dc0a6be528fd7239ac7a483e668.tar.gz
MFH: Fixed bug #34331 (php crashes when variables_order is empty).
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 9d86d7bf1a..e0015b524a 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -720,7 +720,7 @@ int php_hash_environment(TSRMLS_D)
static zend_bool php_auto_globals_create_server(char *name, uint name_len TSRMLS_DC)
{
- if (strchr(PG(variables_order),'S') || strchr(PG(variables_order),'s')) {
+ if (PG(variables_order) && (strchr(PG(variables_order),'S') || strchr(PG(variables_order),'s'))) {
php_register_server_variables(TSRMLS_C);
} else {
zval *server_vars=NULL;
@@ -756,7 +756,7 @@ static zend_bool php_auto_globals_create_env(char *name, uint name_len TSRMLS_DC
}
PG(http_globals)[TRACK_VARS_ENV] = env_vars;
- if (strchr(PG(variables_order),'E') || strchr(PG(variables_order),'e')) {
+ if (PG(variables_order) && (strchr(PG(variables_order),'E') || strchr(PG(variables_order),'e'))) {
php_import_environment_variables(PG(http_globals)[TRACK_VARS_ENV] TSRMLS_CC);
}