[BUGFIX] Some unit tests fail with "Cannot modify header information"
[Packages/TYPO3.CMS.git] / typo3 / template.php
index 0006084..272188e 100644 (file)
@@ -825,7 +825,9 @@ $str.=$this->docBodyTagBegin().
                        // if something is in buffer like debug, put it to end of page
                if (ob_get_contents()) {
                        $str .= ob_get_clean();
-                       header('Content-Encoding: None');
+                       if (!headers_sent()) {
+                               header('Content-Encoding: None');
+                       }
                }
 
                if ($this->docType !== 'xhtml_frames') {