summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-09-01 19:14:54 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-09-01 19:14:54 +0000
commit5f1aa243c35411a4c667d2ca284720c784c963fa (patch)
treea9702a50041234bef4f385912ade9d5f8d7faf63
parentec0b4f91f41bea0aaf83dcbe399c4775b2bda4c3 (diff)
downloadphp-git-5f1aa243c35411a4c667d2ca284720c784c963fa.tar.gz
Fixed bug #34331 (php crashes when variables_order is empty).
-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 0e3858ac1e..3242c0724b 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -969,7 +969,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;
@@ -1004,7 +1004,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);
}