[wp-trac] [WordPress Trac] #11169: Problem with $_SERVER['HTTP_ACCEPT_ENCODING'] in wp-tinymce.php

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 18 13:01:23 UTC 2009


#11169: Problem with $_SERVER['HTTP_ACCEPT_ENCODING'] in wp-tinymce.php
--------------------------+-------------------------------------------------
 Reporter:  cutesquirrel  |       Owner:                              
     Type:  defect (bug)  |      Status:  new                         
 Priority:  low           |   Milestone:                              
Component:  Editor        |     Version:  2.8                         
 Severity:  critical      |    Keywords:  tinyMCE HTTP_ACCEPT_ENCODING
--------------------------+-------------------------------------------------
 Hello,

 my environnement :
 Wordpress 2.8.6
 PHP 5.3

 my tinyMCE editor doesn't work because a notice is generated when testing
 $_SERVER['HTTP_ACCEPT_ENCODING'] value.
 This index HTTP_ACCEPT_ENCODING is not defined on my server (umbreon
 network).
 It's very easy to solve this problem :

 Replace
 ###############################
 if ( isset($_GET['c']) && 1 == $_GET['c'] &&
         false !== strpos(strtolower($_SERVER['HTTP_ACCEPT_ENCODING']),
 'gzip')
                         && ( $file = get_file($basepath . '/wp-
 tinymce.js.gz') ) ) {
         header('Content-Encoding: gzip');
         echo $file;
 } else {
         echo get_file($basepath . '/wp-tinymce.js');
 }
 ###############################

 BY

 ###############################
 if ( isset($_GET['c']) && 1 == $_GET['c'] &&
         isset($_SERVER['HTTP_ACCEPT_ENCODING'])&&
         false !== strpos(strtolower($_SERVER['HTTP_ACCEPT_ENCODING']),
 'gzip')
                         && ( $file = get_file($basepath . '/wp-
 tinymce.js.gz') ) ) {
         header('Content-Encoding: gzip');
         echo $file;
 } else {
         echo get_file($basepath . '/wp-tinymce.js');
 }
 ###############################

 I didn't find why notice are triggered while error_reporting is normaly
 without E_NOTICE. But maybe a plugin add an error_reporting level.

 (Sorry for my english, I hope it's understandable !)

 Best regards.
 Etienne

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11169>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list