From 62aa4dbc7e7feb26a562d3aaca0325e3d2bdc374 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Fri, 10 Apr 2020 23:44:00 +0200 Subject: [PATCH] Check theme dir before trying to load theme --- lib/Pico.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Pico.php b/lib/Pico.php index 6cd245f..21d5769 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -1085,6 +1085,12 @@ class Pico */ 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