aboutsummaryrefslogtreecommitdiff
path: root/mod/blog
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-12-13 03:16:32 +0100
committerSem <sembrestels@riseup.net>2012-12-13 03:16:32 +0100
commit8691b9b9a7f7e9f9537dfeb7fe9831a2d267b7f2 (patch)
tree6967d87d08f0f5a164baebe86cfbec4df202776c /mod/blog
parent6623571b615fc5c9d1b82e2607de4cdaee8a818b (diff)
downloadelgg-8691b9b9a7f7e9f9537dfeb7fe9831a2d267b7f2.tar.gz
elgg-8691b9b9a7f7e9f9537dfeb7fe9831a2d267b7f2.tar.bz2
Checking if pageowner exists before using it.
Diffstat (limited to 'mod/blog')
-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';