Throw an error when the active theme is not found
This commit is contained in:
parent
8b17901aee
commit
7cd80f8a59
|
|
@ -93,6 +93,9 @@ class Controller extends BaseController
|
|||
public function __construct($theme = null)
|
||||
{
|
||||
$this->theme = $theme ? $theme : Theme::getActiveTheme();
|
||||
if (!$this->theme)
|
||||
throw new CmsException(Lang::get('cms::lang.theme.active.not_found'));
|
||||
|
||||
$this->assetPath = Config::get('cms.themesDir').'/'.$this->theme->getDirName();
|
||||
$this->router = new Router($this->theme);
|
||||
$this->initTwigEnvironment();
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ return [
|
|||
'theme' => [
|
||||
'active' => [
|
||||
'not_set' => "The active theme is not set.",
|
||||
'not_found' => "The active theme is not found.",
|
||||
],
|
||||
'edit' => [
|
||||
'not_set' => "The edit theme is not set.",
|
||||
|
|
|
|||
Loading…
Reference in New Issue