Added theme exists check (#679)

This commit is contained in:
Roman Kelesidis 2023-04-14 15:08:20 +07:00 committed by GitHub
commit 78d19700f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,6 +109,11 @@ class Template
$this->tpl = basename($root); $this->tpl = basename($root);
$this->lang =& $lang; $this->lang =& $lang;
$this->use_cache = $bb_cfg['xs_use_cache']; $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");
}
} }
/** /**