From e132a102d8b42975fb205c82c1eca9946b61e73c 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 6ae62db..ce2508a 100644 --- a/libs/DauxHelper.php +++ b/libs/DauxHelper.php @@ -34,9 +34,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");