Fixed ob clearing
authorAlexander Ebert <ebert@woltlab.com>
Thu, 13 Jul 2017 13:23:32 +0000 (15:23 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 13 Jul 2017 13:23:32 +0000 (15:23 +0200)
wcfsetup/install/files/lib/system/WCF.class.php

index e9496ee09ff19af027904dc566d7a9395646cf1b..2ccc546afd45cf541db1f2f1c257abd0db012a3a 100644 (file)
@@ -258,7 +258,9 @@ 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_end_clean();
+                       // 
+                       // ob_get_level() can return values > 1, if the PHP setting `output_buffering` is on
+                       while (ob_get_level()) 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