Last modified: 2010-05-15 15:50:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 11795 - wfGzipHandler HTTP_ACCEPT_ENCODING should have an isset() check
wfGzipHandler HTTP_ACCEPT_ENCODING should have an isset() check
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.10.x
All All
: Normal trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.sixxs.net/wiki/
: easy, patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-28 09:46 UTC by Jeroen Massar
Modified: 2010-05-15 15:50 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jeroen Massar 2007-10-28 09:46:16 UTC
As sometimes it is not set:

[28-Oct-2007 05:15:42] PHP Notice:  Undefined index:  HTTP_ACCEPT_ENCODING in /usr/share/mediawiki1.10/includes/OutputHandler.php on line 26

Simple fix

8<-----------------------------------------------------------
function wfGzipHandler( $s ) {
        if ( function_exists( 'gzencode' ) && !headers_sent() ) {
                $tokens = preg_split( '/[,; ]/', $_SERVER['HTTP_ACCEPT_ENCODING'] );
                if ( in_array( 'gzip', $tokens ) ) {
----------------------------------------------------------->8

SHOULD BE:

8<-----------------------------------------------------------
function wfGzipHandler( $s ) {
        if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && function_exists( 'gzencode' ) && !headers_sent() ) {
                $tokens = preg_split( '/[,; ]/', $_SERVER['HTTP_ACCEPT_ENCODING'] );
                if ( in_array( 'gzip', $tokens ) ) {
----------------------------------------------------------->8

Greets,
 Jeroen
Comment 1 Brion Vibber 2007-10-29 17:42:05 UTC
r27021

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links