Posts Tagged ‘fix’

Visual editor broken in WordPress 1.3.2

Sunday, January 27th, 2008

Seems there is a bug in the latest WordPress check for gzip support which breaks visual editing. I’m not sure which condition below is causing the confusion

// Check if it supports gzip
if (isset($_SERVER['HTTP_ACCEPT_ENCODING']))
        $encodings = explode(',', strtolower(preg_replace("/\s+/", "",
        $_SERVER['HTTP_ACCEPT_ENCODING'])));

if ((in_array('gzip', $encodings) || in_array('x-gzip', $encodings) ||
        isset($_SERVER['---------------'])) &&
        function_exisits('ob_gzhandler') &&
        !ini_get('zlib.output_compression') &&
        ini_get('output_handler') != 'ob_gzhandler') {
        $enc = in_array('x-gzip', $encodings) ? "x-gzip" : "gzip";
        //$supportsGzip = true;
        $supportsGzip = false;
}

but if you modify the $supportsGzip variable to always return false as above, the problem goes away.