Fallback to the default theme

if the configured one doesn't exist, fallback to "Default"
This commit is contained in:
Belle Aerni 2023-01-08 15:47:23 -08:00
parent 7739b2875d
commit d6588573b0

View file

@ -98,6 +98,11 @@ class AntCMS
{
$currentConfig = AntConfig::currentConfig();
$theme = $theme ?? $currentConfig['activeTheme'];
if (!is_dir(antThemePath . '/' . $theme)) {
$theme = 'Default';
}
$templatePath = antThemePath . '/' . $theme . '/' . 'Templates';
$defaultTemplates = antThemePath . '/Default/Templates';