diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-09-29 21:35:34 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-09-29 21:35:34 +0000 |
commit | c7bbda32e0025d085ce4f7700a1a5d85044e93f1 (patch) | |
tree | 91de85f80577d191b773c671b40130215ebd1dce | |
parent | ca334efb32366ef5aa90151f2422049547bf0152 (diff) | |
download | elgg-c7bbda32e0025d085ce4f7700a1a5d85044e93f1.tar.gz elgg-c7bbda32e0025d085ce4f7700a1a5d85044e93f1.tar.bz2 |
Checking for $CONFIG->view_type before accessing it in elgg_is_valid_viewtype(). Prevents a notice during installation.
git-svn-id: http://code.elgg.org/elgg/trunk@6977 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/views.php | 4 |
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); } |