summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/Theme_View.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2013-03-02 14:02:00 -0800
committerBharat Mediratta <bharat@menalto.com>2013-03-02 14:02:00 -0800
commita81e85d3f178ad9081a5e6191d8f99370fdde123 (patch)
tree6d4306e8e9b4edbcba700a1910d6d0a03ce0edde /modules/gallery/libraries/Theme_View.php
parent0d05e91cd3c5050c25133c864f8b789f499d8e17 (diff)
parent9b9f1a7b07daecf2251770e4f49838f22cb58a2a (diff)
Merge pull request #176 from shadlaws/fix_2031
#2031 - Add class_exists() before method_exists() if class existence is unknown.
Diffstat (limited to 'modules/gallery/libraries/Theme_View.php')
-rw-r--r--modules/gallery/libraries/Theme_View.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index 986fc8a2..0a4c96e1 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -239,7 +239,7 @@ class Theme_View_Core extends Gallery_View {
continue;
}
$helper_class = "{$module->name}_theme";
- if (method_exists($helper_class, $function)) {
+ if (class_exists($helper_class) && method_exists($helper_class, $function)) {
$blocks[] = call_user_func_array(
array($helper_class, $function),
array_merge(array($this), $args));
@@ -247,7 +247,7 @@ class Theme_View_Core extends Gallery_View {
}
$helper_class = theme::$site_theme_name . "_theme";
- if (method_exists($helper_class, $function)) {
+ if (class_exists($helper_class) && method_exists($helper_class, $function)) {
$blocks[] = call_user_func_array(
array($helper_class, $function),
array_merge(array($this), $args));