aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/profile/start.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/mod/profile/start.php b/mod/profile/start.php
index 4670fbbda..d6001b3fc 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -179,7 +179,7 @@ function profile_pagesetup()
//add submenu options
if (get_context() == "profile") {
$page_owner = page_owner_entity();
- if ($page_owner->canEdit()) {
+ if ($page_owner && $page_owner->canEdit()) {
add_submenu_item(elgg_echo('profile:editdetails'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/details");
add_submenu_item(elgg_echo('profile:editicon'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/icon");
}