]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
Extension ext-surfbar continued, fixes:
[mailer.git] / inc / template-functions.php
index da8d1670664a420a0d763d7f86142099516fde5c..611d1b107d2dd3e5fcb23887555645f6272ea73b 100644 (file)
@@ -262,8 +262,13 @@ function outputRawCode ($htmlCode) {
 
 // Load a template file and return it's content (only it's name; do not use ' or ")
 function loadTemplate ($template, $return = false, $content = array(), $compileCode = true) {
-       // @TODO Remove this sanity-check if all is fine
-       if (!is_bool($return)) debug_report_bug(__FUNCTION__, __LINE__, 'return is not bool (' . gettype($return) . ')');
+       if (!is_bool($return)) {
+               // @TODO Remove this sanity-check if all is fine
+               debug_report_bug(__FUNCTION__, __LINE__, 'return[] is not bool (' . gettype($return) . ')');
+       } elseif (!is_string($template)) {
+               // $template has to be string
+               debug_report_bug(__FUNCTION__, __LINE__, 'template[] is not string (' . gettype($template) . ')');
+       }
 
        // Set current template
        $GLOBALS['current_template'] = $template;