Skip to content

Commit adc4265

Browse files
committed
Merge branch 'PHP-5.5' into PHP-5.6
2 parents d05070c + 3a71fa3 commit adc4265

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

ext/soap/soap.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,8 +2070,7 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade
20702070

20712071
xmlDocDumpMemory(doc_return, &buf, &size);
20722072

2073-
zend_is_auto_global("_SERVER", sizeof("_SERVER") - 1 TSRMLS_CC);
2074-
if (PG(http_globals)[TRACK_VARS_SERVER] &&
2073+
if ((PG(http_globals)[TRACK_VARS_SERVER] || zend_is_auto_global("_SERVER", sizeof("_SERVER") - 1 TSRMLS_CC)) &&
20752074
zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]->value.ht, "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT"), (void **) &agent_name) == SUCCESS &&
20762075
Z_TYPE_PP(agent_name) == IS_STRING) {
20772076
if (strncmp(Z_STRVAL_PP(agent_name), "Shockwave Flash", sizeof("Shockwave Flash")-1) == 0) {

ext/standard/basic_functions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4227,8 +4227,8 @@ PHP_FUNCTION(getopt)
42274227
/* Get argv from the global symbol table. We calculate argc ourselves
42284228
* in order to be on the safe side, even though it is also available
42294229
* from the symbol table. */
4230-
if (PG(http_globals)[TRACK_VARS_SERVER] &&
4231-
(zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE ||
4230+
if ((PG(http_globals)[TRACK_VARS_SERVER] || zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC)) &&
4231+
(zend_hash_find(Z_ARRVAL_P((PG(http_globals))[TRACK_VARS_SERVER]), "argv", sizeof("argv"), (void **) &args) != FAILURE ||
42324232
zend_hash_find(&EG(symbol_table), "argv", sizeof("argv"), (void **) &args) != FAILURE) && Z_TYPE_PP(args) == IS_ARRAY
42334233
) {
42344234
int pos = 0;

ext/zlib/zlib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ static int php_zlib_output_encoding(TSRMLS_D)
8282
zval **enc;
8383

8484
if (!ZLIBG(compression_coding)) {
85-
zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC);
86-
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)) {
85+
if ((PG(http_globals)[TRACK_VARS_SERVER] || zend_is_auto_global(ZEND_STRL("_SERVER") TSRMLS_CC)) &&
86+
SUCCESS == zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCODING"), (void *) &enc)) {
8787
convert_to_string(*enc);
8888
if (strstr(Z_STRVAL_PP(enc), "gzip")) {
8989
ZLIBG(compression_coding) = PHP_ZLIB_ENCODING_GZIP;

0 commit comments

Comments
 (0)