]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
added check in case something goes wrong with the container entity of a discussion
authorCash Costello <cash.costello@gmail.com>
Mon, 21 Nov 2011 00:48:40 +0000 (19:48 -0500)
committerCash Costello <cash.costello@gmail.com>
Mon, 21 Nov 2011 00:48:40 +0000 (19:48 -0500)
mod/groups/start.php

index 7dcf6b7c4371f42ddc2fb8ca1b40bebe7cd8210d..09362cbbcdc363279edbd34beca9ff0fc0c6aed6 100644 (file)
@@ -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",