From 4c5e2000f606d696a056fcfed231df5be8a42ada Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 20 Nov 2009 21:23:11 -0800 Subject: Don't call theme::get_info() on themes that don't have a theme.info. Fixes #896. --- modules/gallery/controllers/admin_themes.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/gallery/controllers/admin_themes.php b/modules/gallery/controllers/admin_themes.php index 23685c90..6991acd2 100644 --- a/modules/gallery/controllers/admin_themes.php +++ b/modules/gallery/controllers/admin_themes.php @@ -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; } -- cgit v1.2.3