diff --git a/app/Controller/Component/ThemeComponent.php b/app/Controller/Component/ThemeComponent.php index 0f6f9690..986fed80 100755 --- a/app/Controller/Component/ThemeComponent.php +++ b/app/Controller/Component/ThemeComponent.php @@ -346,10 +346,10 @@ private function isValid($slug) private function getThemeFromAPI($slug) { - if (isset($this->themesAvailable['all'])) - foreach ($this->themesAvailable['all'] as $theme) - if (strtolower($theme['slug']) === strtolower($slug)) - return $theme; + if (isset($this->themesAvailable['all'])) foreach ($this->themesAvailable['all'] as $theme) { + if(empty($theme['slug'])) continue; + if (strtolower($theme['slug']) === strtolower($slug)) return $theme; + } return false; }