diff options
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r-- | ext/zlib/zlib.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 0b082048c0..67e67b114e 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -82,10 +82,7 @@ static int php_zlib_output_encoding(void) zval *enc; if (!ZLIBG(compression_coding)) { - zend_string *name = zend_string_init("_SERVER", sizeof("_SERVER") - 1, 0); - zend_is_auto_global(name); - zend_string_release(name); - if (Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY && + if ((Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY || zend_is_auto_global_str(ZEND_STRL("_SERVER"))) && (enc = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_ACCEPT_ENCODING", sizeof("HTTP_ACCEPT_ENCODING") - 1))) { convert_to_string(enc); if (strstr(Z_STRVAL_P(enc), "gzip")) { |