Don't load inaccessible themes

refs #10705
This commit is contained in:
Eric Lippmann 2015-12-07 13:51:30 +01:00
parent bf0b673640
commit cce6af9243
1 changed files with 5 additions and 2 deletions

View File

@ -116,8 +116,11 @@ class LessCompiler
*/ */
public function setTheme($theme) public function setTheme($theme)
{ {
Logger::debug($theme); if (is_file($theme) && is_readable($theme)) {
$this->theme = $theme; $this->theme = $theme;
} else {
Logger::error('Can\t load theme %s. Make sure that the theme exists and is readable', $theme);
}
return $this; return $this;
} }