diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-20 21:23:11 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-20 21:23:11 -0800 |
commit | 4c5e2000f606d696a056fcfed231df5be8a42ada (patch) | |
tree | 4c3e99df5d01914c54dc905eaa3dbe57c5b892a4 /modules | |
parent | befb8244200ce365950a172c3d957d0043efd5d6 (diff) |
Don't call theme::get_info() on themes that don't have a theme.info. Fixes #896.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/controllers/admin_themes.php | 10 |
1 files changed, 6 insertions, 4 deletions
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; } |