diff --git a/src/Controller/Component.php b/src/Controller/Component.php index a528190..209d765 100644 --- a/src/Controller/Component.php +++ b/src/Controller/Component.php @@ -86,7 +86,8 @@ class Controller_Component } public function getTemplateName($_registry/*: Settings*/) { - return (isset($_COOKIE['with_template']) && preg_match('/^[\w\d-]{3,20}$/', $_COOKIE['with_template'])) ? $_COOKIE['with_template'] : $_registry->readKey(array('system', 'template')); + return (isset($_COOKIE['with_template']) && preg_match('/^[\w\d-]{3,20}$/', $_COOKIE['with_template'])) + ? $_COOKIE['with_template'] : ($_registry ? $_registry->readKey(array('system', 'template')) : 'modern'); } public function getView($name)