diff options
-rw-r--r-- | ext/soap/soap.c | 3 | ||||
-rw-r--r-- | ext/standard/basic_functions.c | 4 | ||||
-rw-r--r-- | ext/zlib/zlib.c | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c index b739d338d9..406fdc0f54 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2070,8 +2070,7 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade xmlDocDumpMemory(doc_return, &buf, &size); - zend_is_auto_global("_SERVER", sizeof("_SERVER") - 1 TSRMLS_CC); - if (PG(http_globals)[TRACK_VARS_SERVER] && + if ((PG(http_globals)[TRACK_VARS_SERVER] || zend_is_auto_global("_SERVER", sizeof("_SERVER") - 1 TSRMLS_CC)) && zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]->value.ht, "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT"), (void **) &agent_name) == SUCCESS && Z_TYPE_PP(agent_name) == IS_STRING) { if (strncmp(Z_STRVAL_PP(agent_name), "Shockwave Flash", sizeof("Shockwave Flash")-1) == 0) { diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 97787488b6..6552596438 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4227,8 +4227,8 @@ PHP_FUNCTION(getopt) /* Get argv from the global symbol table. We calculate argc ourselves * in order to be on the safe side, even though it is also available * from the symbol table. */ - if (PG(http_globals)[TRACK_VARS_SERVER] && - (zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE || + if ((PG(http_globals)[TRACK_VARS_SERVER] || zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC)) && + (zend_hash_find(Z_ARRVAL_P((PG(http_globals))[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE || zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) && Z_TYPE_PP(args) == IS_ARRAY ) { int pos = 0; diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 4c98fae8f7..d70198c674 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -82,8 +82,8 @@ static int php_zlib_output_encoding(TSRMLS_D) zval **enc; if (!ZLIBG(compression_coding)) { - zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC); - if (PG(http_globals)[TRACK_VARS_SERVER] && SUCCESS == zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCODING"), (void *) &enc)) { + if ((PG(http_globals)[TRACK_VARS_SERVER] || zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC)) && + SUCCESS == zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCODING"), (void *) &enc)) { convert_to_string(*enc); if (strstr(Z_STRVAL_PP(enc), "gzip")) { ZLIBG(compression_coding) = PHP_ZLIB_ENCODING_GZIP; |