From: Alexander Ebert Date: Sat, 5 May 2018 08:32:27 +0000 (+0200) Subject: HTTP_ENABLE_GZIP is not defined w/o database access X-Git-Tag: 3.1.3~6^2~14 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4d7a0b737fa62e130b605910e149d3287584f904;p=GitHub%2FWoltLab%2FWCF.git HTTP_ENABLE_GZIP is not defined w/o database access The option is defined through the `options.inc.php`, but it cannot be regenerated when there is no connection to the database. --- diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index 2cd86993e2..e998fdb499 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -273,7 +273,7 @@ class WCF { // Especially the `identity` value appears to be unrecognized by some of them, hence // we'll just gzip the output of the exception to prevent them from tampering. // This part is copied from `HeaderUtil` in order to isolate the exception handler! - if (HTTP_ENABLE_GZIP && !defined('HTTP_DISABLE_GZIP')) { + if (defined('HTTP_ENABLE_GZIP') && HTTP_ENABLE_GZIP && !defined('HTTP_DISABLE_GZIP')) { if (function_exists('gzcompress') && !@ini_get('zlib.output_compression') && !@ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) { if (strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip')) { @header('Content-Encoding: x-gzip');