Don't call theme::get_info() on themes that don't have a theme.info. Fixes #896.

This commit is contained in:
Bharat Mediratta
2009-11-20 21:23:11 -08:00
parent befb824420
commit 4c5e2000f6

View File

@@ -30,11 +30,13 @@ class Admin_Themes_Controller extends Admin_Controller {
private function _get_themes() {
$themes = array();
foreach (scandir(THEMEPATH) as $theme_name) {
if ($theme_name[0] == ".") {
continue;
}
if (file_exists(THEMEPATH . "$theme_name/theme.info")) {
if ($theme_name[0] == ".") {
continue;
}
$themes[$theme_name] = theme::get_info($theme_name);
$themes[$theme_name] = theme::get_info($theme_name);
}
}
return $themes;
}