From 46dd43f10bfd04792c4d3cc17d86b9cc308ccfd2 Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 8 Jan 2009 17:44:52 +0000 Subject: Added extra belts and braces check (minor) git-svn-id: https://code.elgg.org/elgg/trunk@2550 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/lib/entities.php b/engine/lib/entities.php index a2f671d30..2f8653ce2 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1452,7 +1452,7 @@ } // Cache entity if we have a cache available - if ($newentity_cache) $newentity_cache->save($new_entity->guid, $new_entity); + if (($newentity_cache) && ($new_entity)) $newentity_cache->save($new_entity->guid, $new_entity); return $new_entity; } -- cgit v1.2.3