Skip to content

Commit

Permalink
Merge pull request #10904 from Elgg/mrclay-10902-search
Browse files Browse the repository at this point in the history
fix(search): no longer fatals if comment container hidden
  • Loading branch information
mrclay committed Apr 15, 2017
2 parents f8b1043 + 16a753a commit f167518
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mod/search/views/default/search/object/comment/entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
$icon = elgg_view_entity_icon($owner, 'tiny');

$container = $entity->getContainerEntity();
if (!$container) {
elgg_log("Search found comment {$entity->guid}, but the user cannot see its container.", 'WARNING');
return;
}

if ($container->getType() == 'object') {
$title = $container->title;
Expand Down

0 comments on commit f167518

Please sign in to comment.