]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Several bugfixes/improvements: (again)
[mailer.git] / inc / functions.php
index 5c0715d6bb94e06704c683e33f737315b66c4f31..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();
 
@@ -752,7 +764,7 @@ function SET_LANGUAGE($lang) {
 }
 //
 function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") {
-       global $DATA, $REPLACER;
+       global $DATA, $REPLACER, $_CONFIG;
 
        // Make sure all template names are lowercase!
        $template = strtolower($template);