// 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;