]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Damn thing missed... ;)
[mailer.git] / inc / functions.php
index de2c08a4a07deeb568e4db45614a6c7dfda0a9a3..6484f86506c605f8010c22e206c570b431cd0c14 100644 (file)
@@ -860,6 +860,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") {
        } // END - if
 
        // Now does the final template exists?
+       $newContent = "";
        if (FILE_READABLE($file)) {
                // The local file does exists so we load it. :)
                $tmpl_file = @implode("", @file($file));
@@ -887,6 +888,12 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") {
                $newContent = NO_TEMPLATE_SUPPLIED;
        }
 
+       // Is there some content?
+       if (empty($newContent)) {
+               // Compiling failed
+               $newContent = "Compiler error for template {$template}!";
+       } // END - if
+
        // Return compiled content
        return COMPILE_CODE($newContent);
 }