aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/river2.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/river2.php')
-rw-r--r--engine/lib/river2.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/lib/river2.php b/engine/lib/river2.php
index 8e015ea0d..8fb20ac40 100644
--- a/engine/lib/river2.php
+++ b/engine/lib/river2.php
@@ -374,8 +374,10 @@ function elgg_get_river_items($subject_guid = 0, $object_guid = 0, $subject_rela
function elgg_view_river_item($item) {
if (isset($item->view)) {
$object = get_entity($item->object_guid);
- if (!$object) {
- $body = elgg_view('river/item/noaccess');
+ $subject = get_entity($item->subject_guid);
+ if (!$object || !$subject) {
+ // probably means an entity is disabled
+ return false;
} else {
if (elgg_view_exists($item->view)) {
$body = elgg_view($item->view,array(