Only enable gzip compression if it is not enabled in php.ini. Fixes #4426
git-svn-id: https://develop.svn.wordpress.org/trunk@5810 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0ff4f66464
commit
45226eae66
@ -394,10 +394,16 @@ function maybe_serialize($data) {
|
||||
}
|
||||
|
||||
function gzip_compression() {
|
||||
if ( !get_option('gzipcompression') ) return false;
|
||||
if ( !get_option( 'gzipcompression' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( extension_loaded('zlib') ) {
|
||||
ob_start('ob_gzhandler');
|
||||
if ( ( ini_get( 'zlib.output_compression' ) == 'On' || ini_get( 'zlib.output_compression_level' ) > 0 ) || ini_get( 'output_handler' ) == 'ob_gzhandler' ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( extension_loaded( 'zlib' ) ) {
|
||||
ob_start( 'ob_gzhandler' );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user