aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/blog/views/default')
-rw-r--r--mod/blog/views/default/blog/sidebar/archives.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/mod/blog/views/default/blog/sidebar/archives.php b/mod/blog/views/default/blog/sidebar/archives.php
index 3d8f28ca4..f6e41002f 100644
--- a/mod/blog/views/default/blog/sidebar/archives.php
+++ b/mod/blog/views/default/blog/sidebar/archives.php
@@ -3,10 +3,9 @@
* Blog archives
*/
-$loggedin_user = elgg_get_logged_in_user_entity();
$page_owner = elgg_get_page_owner_entity();
-if (elgg_instanceof($page_owner, 'user')) {
+if ($page_owner && elgg_instanceof($page_owner, 'user')) {
$url_segment = 'blog/archive/' . $page_owner->username;
} else {
$url_segment = 'blog/group/' . $page_owner->getGUID() . '/archive';