aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/views.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index d10a296d8..6afcc5b76 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1259,6 +1259,10 @@ function page_draw($title, $body, $page_shell = 'page_shells/default', $vars = a
function elgg_is_valid_view_type($view_type) {
global $CONFIG;
+ if (!isset($CONFIG->view_types) || !is_array($CONFIG->view_types)) {
+ return FALSE;
+ }
+
return in_array($view_type, $CONFIG->view_types);
}