From 5f2c3ab440996769edc8f830a4f01e4c452ac374 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 13 May 2017 21:17:42 +0200 Subject: [PATCH] Avoid encoding issue when printing an unhandled exception --- wcfsetup/install/files/lib/system/WCF.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.20.1