[*] CORE : Throw Exception when no theme selected

This commit is contained in:
gRoussac
2013-11-28 15:32:19 +01:00
parent e722a5c817
commit 336e784ca5
2 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -93,13 +93,15 @@ $context = Context::getContext();
try
{
$context->shop = Shop::initialize();
if (Tools::isEmpty($theme_name = $context->shop->getTheme()) || !file_exists(_PS_ALL_THEMES_DIR_.$theme_name))
throw new PrestaShopException('No theme selected');
}
catch (PrestaShopException $e)
{
$e->displayMessage();
}
define('_THEME_NAME_', $context->shop->getTheme());
define('_THEME_NAME_', $theme_name);
define('__PS_BASE_URI__', $context->shop->getBaseURI());
/* Include all defines related to base uri and theme name */