From 073ff59b1ac99c7431cfd35c32096f2d16b7a2bd Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Thu, 7 Jul 2016 11:30:02 +0200 Subject: [PATCH] [UPDATE] Catch missing theme folder from website_theme setting --- include/smarty_globals.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/smarty_globals.inc.php b/include/smarty_globals.inc.php index de12ac16..fcfdbb69 100644 --- a/include/smarty_globals.inc.php +++ b/include/smarty_globals.inc.php @@ -224,6 +224,10 @@ if ($motd = $setting->getValue('system_motd')) { if ($setting->getValue('website_theme') == "mpos") $_SESSION['POPUP'][] = array('CONTENT' => 'You are using an old Theme that will not be maintained in the future.', 'TYPE' => 'alert alert-warning'); +// Check we can load the theme at all +if ( !in_array($setting->getValue('website_theme'), $template->getThemes())) + die('Unable to find your selected theme `' . $setting->getValue('website_theme') . '` in the list of available themes. Please reset your `website_theme` setting in your database.'); + // So we can display additional info $smarty->assign('DEBUG', $config['DEBUG']);