aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/template.php')
-rw-r--r--phpBB/includes/template.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index 1e1ad31193..5281860ac5 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -50,6 +50,10 @@ class template
$this->root = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template';
$this->cachepath = $phpbb_root_path . 'cache/tpl_' . $user->theme['template_path'] . '_';
}
+ else
+ {
+ trigger_error('Template path could not be found: styles/' . $user->theme['template_path'] . '/template', E_USER_ERROR);
+ }
return true;
}
@@ -183,7 +187,7 @@ class template
$filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx;
- $recompile = (($config['load_tplcompile'] && @filemtime($filename) < filemtime($this->files[$handle])) || !file_exists($filename)) ? true : false;
+ $recompile = (($config['load_tplcompile'] && @filemtime($filename) < filemtime($this->files[$handle])) || !file_exists($filename) || @filesize($filename) === 0) ? true : false;
// Recompile page if the original template is newer, otherwise load the compiled version
if (!$recompile)