From: Alexander Ebert Date: Sat, 13 May 2017 19:17:42 +0000 (+0200) Subject: Avoid encoding issue when printing an unhandled exception X-Git-Tag: 3.0.5~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5f2c3ab440996769edc8f830a4f01e4c452ac374;p=GitHub%2FWoltLab%2FWCF.git Avoid encoding issue when printing an unhandled exception --- diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index 3a6923c555..ebf3e7299c 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -245,7 +245,12 @@ class WCF { if (ob_get_level()) { // discard any output generated before the exception occured, prevents exception // being hidden inside HTML elements and therefore not visible in browser output - ob_clean(); + ob_end_clean(); + + // `identity` is the default "encoding" and basically means that the client + // must treat the content as if the header did not appear in first place, this + // also overrules the gzip header if present + @header('Content-Encoding: identity'); } // backwards compatibility