diff --git a/lib/Pico.php b/lib/Pico.php index 6cd245feb..21d57694c 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -1085,6 +1085,12 @@ public function getConfig($configName = null, $default = null) */ protected function loadTheme() { + if (!is_dir($this->getThemesDir() . $this->getTheme())) { + throw new \RuntimeException( + 'Couldn\'t load theme "' . $this->theme . '": No such theme directory' + ); + } + $themeConfig = []; // load theme config from pico-theme.yml