aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/elgglib.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index cbbe1c201..71cf2ae51 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -492,6 +492,9 @@
global $autofeed;
$autofeed = true;
+ // No point continuing if entity is null.
+ if (!$entity) return '';
+
$view = $entity->view;
if (is_string($view)) {
return elgg_view($view,array('entity' => $entity), $bypass, $debug);