From c19e10b8b1d196c865d5cdfe4dffa10b0eecdfb6 Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 7 Aug 2008 13:01:09 +0000 Subject: Refs #174: Checking that session user exists before calling methods on it git-svn-id: https://code.elgg.org/elgg/trunk@1757 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/page_elements/title.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views') diff --git a/views/default/page_elements/title.php b/views/default/page_elements/title.php index fd5ccba06..2e8e3e4b7 100644 --- a/views/default/page_elements/title.php +++ b/views/default/page_elements/title.php @@ -19,7 +19,7 @@ $submenu = get_submenu(); // elgg_view('canvas_header/submenu'); if (!empty($submenu)) $submenu = ""; - if($page_owner && $page_owner_user->guid != $_SESSION['user']->getGUID()) { + if ((!$_SESSION['user']) || ($page_owner && $page_owner_user->guid != $_SESSION['user']->getGUID())) { $info = "

" . $vars['title'] . "

"; if($page_owner_user instanceOf ElggGroup) { $display = "
" . $info . "
"; -- cgit v1.2.3