Skip to content

Commit

Permalink
Check theme dir before trying to load theme
Browse files Browse the repository at this point in the history
  • Loading branch information
PhrozenByte committed Apr 10, 2020
1 parent dffaa01 commit 62aa4db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Pico.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62aa4db

Please sign in to comment.