diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-09-01 19:15:19 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-09-01 19:15:19 +0000 |
commit | 5f8809907a612e7eaf8fe4e638b5f61576e1de16 (patch) | |
tree | d8b86c9064beca7c9f78f9851710009cf19992c0 /main/php_variables.c | |
parent | 64cfbf539f67eaa6ee84dff5a36e93c568b09eab (diff) | |
download | php-git-5f8809907a612e7eaf8fe4e638b5f61576e1de16.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 507f0526ba..4479d6cc77 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -727,7 +727,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; @@ -762,7 +762,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); } |