From a35e00f095cfbe924af589260649674f6b05384a Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 20 Nov 2011 19:48:40 -0500 Subject: added check in case something goes wrong with the container entity of a discussion --- mod/groups/start.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/groups/start.php') diff --git a/mod/groups/start.php b/mod/groups/start.php index 7dcf6b7c4..09362cbbc 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -830,7 +830,7 @@ function discussion_add_to_river_menu($hook, $type, $return, $params) { if (elgg_instanceof($object, 'object', 'groupforumtopic')) { if ($item->annotation_id == 0) { $group = $object->getContainerEntity(); - if ($group->canWriteToContainer() || elgg_is_admin_logged_in()) { + if ($group && ($group->canWriteToContainer() || elgg_is_admin_logged_in())) { $options = array( 'name' => 'reply', 'href' => "#groups-reply-$object->guid", -- cgit v1.2.3