diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-09-01 19:15:51 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-09-01 19:15:51 +0000 |
commit | b56f2fe12d542dc0a6be528fd7239ac7a483e668 (patch) | |
tree | 240b349706ede8b6a7338dac9fb7fdb8329f60c1 /main/php_variables.c | |
parent | 54ee2cf3e46f38375db03eff606f36419f3454e3 (diff) | |
download | php-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.c | 4 |
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); } |