Skip to content

Commit a1cb113

Browse files
authored
Merge pull request #2518 from MPOS/catch-missing-theme
[UPDATE] Catch missing theme folder from website_theme setting
2 parents 4a67b5c + 073ff59 commit a1cb113

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/smarty_globals.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@
224224
if ($setting->getValue('website_theme') == "mpos")
225225
$_SESSION['POPUP'][] = array('CONTENT' => 'You are using an old Theme that will not be maintained in the future.', 'TYPE' => 'alert alert-warning');
226226

227+
// Check we can load the theme at all
228+
if ( !in_array($setting->getValue('website_theme'), $template->getThemes()))
229+
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.');
230+
227231
// So we can display additional info
228232
$smarty->assign('DEBUG', $config['DEBUG']);
229233

0 commit comments

Comments
 (0)