From: Cash Costello Date: Mon, 21 Nov 2011 00:48:40 +0000 (-0500) Subject: added check in case something goes wrong with the container entity of a discussion X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=d2a0969effd0d01b5e26ab916398bc0eb08cb9f6;p=lorea%2Felgg.git added check in case something goes wrong with the container entity of a discussion --- 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",