From 15c4da62d997a4d3cf4598c44e25345c127a11fd Mon Sep 17 00:00:00 2001 From: Sam Hermans Date: Thu, 28 Jul 2016 10:59:54 +0300 Subject: [PATCH] Dont set theme-variant if there is none --- libs/DauxHelper.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/DauxHelper.php b/libs/DauxHelper.php index 950848d..bdd6aee 100644 --- a/libs/DauxHelper.php +++ b/libs/DauxHelper.php @@ -35,9 +35,13 @@ class DauxHelper } $theme = explode('-', $params['html']['theme']); - - $params['html']['theme-variant'] = array_pop($theme); - $params['html']['theme'] = implode('-', $theme); + // do we have a variant or only a theme ? + if(isset($theme[1])) { + $params['html']['theme-variant'] = array_pop($theme); + $params['html']['theme'] = implode('-', $theme); + } else { + $params['html']['theme'] = array_pop($theme); + } if (!is_dir($params['themes_path'] . DIRECTORY_SEPARATOR . $params['html']['theme'])) { throw new \RuntimeException("Theme '{$params['html']['theme']}' not found");