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.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/engine/lib/river2.php b/engine/lib/river2.php
index a08e29dc8..9d62d88f7 100644
--- a/engine/lib/river2.php
+++ b/engine/lib/river2.php
@@ -210,10 +210,15 @@
function elgg_view_river_item($item) {
if (isset($item->view)) {
- if (elgg_view_exists($item->view)) {
- $body = elgg_view($item->view,array(
- 'item' => $item
- ));
+ $object = get_entity($item->object_guid);
+ if (!$object) {
+ $body = elgg_view('river/item/noaccess');
+ } else {
+ if (elgg_view_exists($item->view)) {
+ $body = elgg_view($item->view,array(
+ 'item' => $item
+ ));
+ }
}
return elgg_view('river/item/wrapper',array(
'item' => $item,