Merge remote-tracking branch 'refs/remotes/origin/3.0'
authorAlexander Ebert <ebert@woltlab.com>
Thu, 13 Jul 2017 13:38:54 +0000 (15:38 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 13 Jul 2017 13:38:54 +0000 (15:38 +0200)
1  2 
wcfsetup/install/files/lib/system/WCF.class.php

index b9ed2b0a5467d340bf7befbd70a6574eae6eb6f2,2ccc546afd45cf541db1f2f1c257abd0db012a3a..5099a1f57e4a9f7cb9d6f8cfccbff3a6f7aa19b6
@@@ -256,9 -256,11 +256,11 @@@ class WCF 
         */
        public static final function handleException($e) {
                if (ob_get_level()) {
 -                      // discard any output generated before the exception occured, prevents exception
 +                      // discard any output generated before the exception occurred, 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