aboutsummaryrefslogtreecommitdiff
path: root/mod/groups
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-20 19:48:40 -0500
committercash <cash.costello@gmail.com>2011-11-28 21:44:01 -0500
commitd2a0969effd0d01b5e26ab916398bc0eb08cb9f6 (patch)
tree564d9589ff0e393727d0044da98f7840acf1aa2e /mod/groups
parent059aa2db0dd5af4a1b35253b2c136813f86c3ca5 (diff)
downloadelgg-d2a0969effd0d01b5e26ab916398bc0eb08cb9f6.tar.gz
elgg-d2a0969effd0d01b5e26ab916398bc0eb08cb9f6.tar.bz2
added check in case something goes wrong with the container entity of a discussion
Diffstat (limited to 'mod/groups')
-rw-r--r--mod/groups/start.php2
1 files changed, 1 insertions, 1 deletions
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",