summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2015-02-13 13:12:44 +0800
committerXinchen Hui <laruence@php.net>2015-02-13 13:12:44 +0800
commitadc42657922be5da0e7fe5ac53027c6c4960ae3e (patch)
tree6e9bef881e1f5ddb255a0ef440d36216932387b5
parentd05070c98df7460e1b3d5f182f7ba99298454f58 (diff)
parent3a71fa36a230d1908d71a98086ab7c6fa9519530 (diff)
downloadphp-git-adc42657922be5da0e7fe5ac53027c6c4960ae3e.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
-rw-r--r--ext/soap/soap.c3
-rw-r--r--ext/standard/basic_functions.c4
-rw-r--r--ext/zlib/zlib.c4
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;