diff --git a/src/Legacy/Template.php b/src/Legacy/Template.php index 6ea32b9b4..b0bdc80db 100644 --- a/src/Legacy/Template.php +++ b/src/Legacy/Template.php @@ -109,6 +109,11 @@ class Template $this->tpl = basename($root); $this->lang =& $lang; $this->use_cache = $bb_cfg['xs_use_cache']; + + // Check template exists + if (!file_exists($this->root) || !is_dir($this->root)) { + die("Theme ({$this->tpl}) directory not found"); + } } /**