aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-16 15:39:44 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-16 15:39:44 +0000
commitd0980545ba6cd44de6caaacdf32138e79a4a2160 (patch)
tree3e1360d87f6f4fb6bc4d57c58c74a6bf5147c5ef /engine
parent9330baece53a1e0adb5e8ae08dfec4dfec7ca2de (diff)
downloadelgg-d0980545ba6cd44de6caaacdf32138e79a4a2160.tar.gz
elgg-d0980545ba6cd44de6caaacdf32138e79a4a2160.tar.bz2
Short circuit get entity on impossible values, saving two db queries per page
git-svn-id: https://code.elgg.org/elgg/trunk@2767 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/entities.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index a85596d8a..ebb176feb 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1386,6 +1386,8 @@
{
global $CONFIG;
+ if (!$guid) return false;
+
$guid = (int) $guid;
$row = retrieve_cached_entity_row($guid);