Skip to content

Commit 3a71fa3

Browse files
committed
Micro opt
1 parent 371c016 commit 3a71fa3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ext/soap/soap.c

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

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

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