aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-13 09:00:44 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-13 09:00:44 +0000
commitac2d81526779f2f1ff9486922bed41f4a4579947 (patch)
treea2179b97b2f1727efd3b1d73b9d2312a2522338f
parent17679198a0a19b292cef59563f28e9889891765f (diff)
downloadelgg-ac2d81526779f2f1ff9486922bed41f4a4579947.tar.gz
elgg-ac2d81526779f2f1ff9486922bed41f4a4579947.tar.bz2
Closes #769: Added short circuit to quit function if entity is null.
git-svn-id: https://code.elgg.org/elgg/trunk@2732 36083f99-b078-4883-b0ff-0f9b5a30f544
-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);