Several bugfixes/improvements: (again)
[mailer.git] / inc / functions.php
index 591f12976bfae3e57a08f8a04c7e0efa0747d1c8..d47a72123e24a3c1da5190d1b5be9f351e006c39 100644 (file)
@@ -137,6 +137,18 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) {
                        break;
                }
        } elseif ((_OB_CACHING == "on") && ($footer == 1)) {
+               // Headers already sent?
+               if (headers_sent()) {
+                       // Log this error
+                       DEBUG_LOG(__FUNCTION__, __LINE__, "Headers already sent! We need debug backtrace here.");
+
+                       // Output debug trace
+                       print("<stron>Headers are already sent!</strong><br />\n");
+                       print("Please report this error at <a href=\"http://bugs.mxchange.org\" rel=\"external\" target=\"_blank\">bugs.mxchange.org</a>:<pre>");
+                       debug_print_backtrace();
+                       die("</pre>Thank you for your help finding bugs.");
+               } // END - if
+
                // Output cached HTML code
                $OUTPUT = ob_get_contents();